Edit password, improve in UI

This commit is contained in:
Diego Najar 2018-11-05 23:57:52 -03:00
parent d531358810
commit 59346bcc12

View File

@ -1,19 +1,29 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
<div class="align-middle">
<div class="float-right mt-1">
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$user->username() ?>" role="button"><?php $L->p('Cancel') ?></a>
</div>
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Change password'), 'icon'=>'person')); ?>
</div>
<?php
echo Bootstrap::pageTitle(array('title'=>$L->g('Change password'), 'icon'=>'person'));
echo Bootstrap::formOpen(array());
// Token CSRF
echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF()
));
// Username
echo Bootstrap::formInputHidden(array(
'name'=>'username',
'value'=>$user->username()
));
// Username disabled
echo Bootstrap::formInputText(array(
'name'=>'usernameDisabled',
'label'=>$L->g('Username'),
@ -24,6 +34,7 @@ echo Bootstrap::formOpen(array());
'tip'=>''
));
// New password
echo Bootstrap::formInputText(array(
'name'=>'newPassword',
'label'=>$L->g('New password'),
@ -34,6 +45,7 @@ echo Bootstrap::formOpen(array());
'tip'=>''
));
// Confirm password
echo Bootstrap::formInputText(array(
'name'=>'confirmPassword',
'label'=>$L->g('Confirm new password'),
@ -43,14 +55,6 @@ echo Bootstrap::formOpen(array());
'placeholder'=>'',
'tip'=>''
));
?>
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$user->username().'#security" role="button">'.$L->g('Cancel').'</a>
</div>
';
echo Bootstrap::formClose();
?>
<?php echo Bootstrap::formClose(); ?>