public function showForm($id = -1, $not_in_admin = false) { $this->prepareForm($id, array('method' => 'post', 'action' => $id > 0 ? 'usuario/atualizar/' . $id : 'usuario/adicionar')); echo "<div class='ls-tab-content ls-active' id='#infos'>"; echo "<table class='easy-form-table'>"; if ($this->objectID > 0) { echo "<tr>"; echo "<td>"; echo "<div class='casting-profile-container'>"; echo "<img src='data:image/jpg;base64," . $this->fields['foto'] . "' class='casting-profile'></img>"; echo "<a href='#' class='changePhoto' data-url_change='" . base_url() . "ajax/usuario/changePicture/' data-profile_id='" . $id . "'><span class='fa fa-camera fa-2x'></span> Alterar foto</a>"; echo "</div>"; echo "</td>"; echo "</tr>"; } echo "<tr>"; echo "<td>"; SystemHelper::addTextfield(array('label' => 'Nome de exibição', 'name' => 'nome_exibicao', 'required' => true, 'value' => $this->fields['nome_exibicao'])); echo "</td>"; echo "<td>"; SystemHelper::addDatefield(array('label' => 'Data de Nascimento', 'name' => 'dt_nasc', 'useIcon' => true, 'width' => '120px', 'value' => SystemHelper::convertDateFromUS($this->fields['dt_nasc']))); echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td colspan='2'>"; SystemHelper::addTextfield(array('label' => 'Email', 'name' => 'email', 'required' => true, 'value' => $this->fields['email'])); echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>"; SystemHelper::addTextfield(array('label' => 'Usuário', 'name' => 'usuario', 'required' => $id < 0 ? true : false, 'disabled' => $this->objectID > 0 ? true : false, 'value' => $this->fields['usuario'])); echo "</td>"; echo "</tr>"; if (!$not_in_admin) { echo "<tr>"; echo "<td>"; SystemHelper::addPasswordfield(array('label' => 'Senha', 'name' => 'senha')); echo "</td>"; echo "<td>"; SystemHelper::addPasswordfield(array('label' => 'Confirmação da senha', 'name' => 'senha_confirmacao')); echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>"; SystemHelper::addYesNoToggle(array('label' => 'Administrador', 'name' => 'administrador', 'value' => 1, 'checked' => $this->fields['administrador'])); echo "</td>"; echo "</tr>"; } // ajuste para manter a configuração de administrado caso usuário atualize seu perfil if ($not_in_admin) { SystemHelper::addHiddenfield('', 'administrador', $this->fields['administrador']); } echo "</table>"; echo "</div>"; $this->addButtons(); }
"> <meta name="viewport" content="user-scalable=no,width=device-width, initial-scale=1"/> </head> <body> <div class="loginContainer"> <div class="loginLogo"><img src='assets/images/logoMenu.png' width="" height=""></img></div> <div class="loginForm"> <span>Autênticação de usuário</span> <?php if (!empty($error_msg)) { echo "<br><br>"; AlertMessage::display(array('type' => AlertMessage::ERROR, 'icon' => 'ls-ico-user', 'style' => 'margin-bottom:0;', 'msg' => $error_msg)); } ?> <form method="post" action="doLogin"> <?php SystemHelper::addTextfield(array('label' => 'Usuário', 'placeholder' => 'Informe seu usuário', 'name' => 'login_username')); SystemHelper::addPasswordfield(array('label' => 'Senha', 'style' => 'margin-bottom:10px', 'placeholder' => 'Informe sua senha', 'name' => 'login_password')); ?> <div class="loginFormButtons"> <?php SystemHelper::addSubmitButton(array('label' => 'Entrar', 'icon' => 'fa fa-sign-in')); ?> </div> </form> </div> </div> </body> </html>