bludit/bl-kernel/admin/views/user-password.php

60 lines
1.4 KiB
PHP
Raw Permalink Normal View History

2018-11-06 03:57:52 +01:00
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
2015-11-07 01:23:50 +01:00
2018-11-06 03:57:52 +01:00
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
2015-11-07 01:23:50 +01:00
2018-11-06 03:57:52 +01:00
<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>
2019-05-18 11:54:39 +02:00
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Change password'), 'icon'=>'user')); ?>
2018-11-06 03:57:52 +01:00
</div>
2015-11-07 01:23:50 +01:00
2018-11-06 03:57:52 +01:00
<?php
// Token CSRF
2018-05-15 20:12:15 +02:00
echo Bootstrap::formInputHidden(array(
2015-11-07 01:23:50 +01:00
'name'=>'tokenCSRF',
'value'=>$security->getTokenCSRF()
2015-11-07 01:23:50 +01:00
));
2018-11-06 03:57:52 +01:00
// Username
2018-05-15 20:12:15 +02:00
echo Bootstrap::formInputHidden(array(
2015-11-07 01:23:50 +01:00
'name'=>'username',
2018-05-15 20:12:15 +02:00
'value'=>$user->username()
2015-11-07 01:23:50 +01:00
));
2018-11-06 03:57:52 +01:00
// Username disabled
2018-05-15 20:12:15 +02:00
echo Bootstrap::formInputText(array(
'name'=>'usernameDisabled',
2015-11-07 01:23:50 +01:00
'label'=>$L->g('Username'),
2018-05-15 20:12:15 +02:00
'value'=>$user->username(),
'class'=>'',
'placeholder'=>'',
2015-11-07 01:23:50 +01:00
'disabled'=>true,
'tip'=>''
));
2018-11-06 03:57:52 +01:00
// New password
2018-05-15 20:12:15 +02:00
echo Bootstrap::formInputText(array(
'name'=>'newPassword',
2015-11-07 01:23:50 +01:00
'label'=>$L->g('New password'),
2018-05-15 20:12:15 +02:00
'type'=>'password',
2015-11-07 01:23:50 +01:00
'value'=>'',
2018-05-15 20:12:15 +02:00
'class'=>'',
'placeholder'=>'',
2015-11-07 01:23:50 +01:00
'tip'=>''
));
2018-11-06 03:57:52 +01:00
// Confirm password
2018-05-15 20:12:15 +02:00
echo Bootstrap::formInputText(array(
'name'=>'confirmPassword',
'label'=>$L->g('Confirm new password'),
'type'=>'password',
2015-11-07 01:23:50 +01:00
'value'=>'',
2018-05-15 20:12:15 +02:00
'class'=>'',
'placeholder'=>'',
2015-11-07 01:23:50 +01:00
'tip'=>''
));
2018-11-06 03:57:52 +01:00
?>
2015-11-07 01:23:50 +01:00
2018-11-06 03:57:52 +01:00
<?php echo Bootstrap::formClose(); ?>