<div class="col-md-12 col-xs-12 hidden-xs"> <?php include get_template_directory() . '/includes/mapa.php'; ?> </div> <div id="step-2-dropdown" class="visible-xs-block"> <div class="col-xs-2"> <label for="user_UF">UF</label> </div> <div class="col-xs-10"> <?php $user_UF = isset($_POST['user_UF']) ? $_POST['user_UF'] : ''; ?> <?php echo dropdown_states('user_UF', $user_UF, true); ?> </div><!-- --><div class="col-xs-2"> <label for="user_setorial">Setorial</label> </div> <div class="col-xs-10"> <?php $user_setorial = isset($_POST['user_setorial']) ? $_POST['user_setorial'] : ''; ?> <?php echo dropdown_setoriais('user_setorial', $user_setorial, true); ?> </div> </div>
/** * Campos extras no perfil do usuário * * @name edit_user_details * @author Cleber Santos <*****@*****.**> * @since 2015-08-31 * @updated 2015-08-31 * @return mixed */ function edit_user_details($user) { ?> <table class="form-table"> <tr> <th> <label>CPF</label> </th> <td> <input id="cpf" type="text" name="cpf" value="<?php echo esc_attr(get_user_meta($user->ID, 'cpf', true)); ?> " disabled="disabled" /> <span class="description">Não é possível alterar</span> </td> </tr> <tr> <th><label>Nome completo</label></th> <td> <input type="text" class="regular-text" name="user_name" value="<?php echo esc_attr(get_user_meta($user->ID, 'user_name', true)); ?> " disabled="disabled" /> <span class="description">Não é possível alterar</span> </td> </tr> <tr> <th><label>Data nascimento</label></th> <td> <input type="text" name="date_birth" value="<?php echo restore_format_date(esc_attr(get_user_meta($user->ID, 'date_birth', true))); ?> " disabled="disabled"/> <span class="description">Não é possível alterar</span> </td> </tr> <?php $disabled = ''; ?> <?php $disabled = $this->user_can_change_setorial_uf($user->ID) && $this->user_can_change_uf($user->ID) ? '' : 'disabled="disabled"'; ?> <tr> <th><label>Estado</label></th> <td> <?php echo dropdown_states('uf', get_user_meta($user->ID, 'UF', true), false, $disabled); ?> <span class="description">Só pode alterar uma vez</span> </td> </tr> <?php $disabled = $this->user_can_change_setorial_uf($user->ID) && $this->user_can_change_setorial($user->ID) ? '' : 'disabled="disabled"'; ?> <tr> <th><label>Setorial</label></th> <td> <?php echo dropdown_setoriais('setorial', get_user_meta($user->ID, 'setorial', true), false, $disabled); ?> <span class="description">Só pode alterar uma vez</span> </td> </tr> <tr> <th></th> <td> <?php if ($this->user_is_candidate_was_voted($user->ID)) { ?> <input type="hidden" id="candidate_was_voted" value="true" /> <span class="description warning">Candidato, se você alterar o seu estado ou setorial os seus votos serão apagados. <br> Esta ação não pode ser desfeita.</span> <?php } ?> </td> </tr> </table> <?php }