2018-04-27 20:36:43 +02:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
2015-10-19 00:45:58 +02:00
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::pageTitle(array('title'=>$L->g('Add a new user'), 'icon'=>'person'));
|
2015-10-19 00:45:58 +02:00
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::formOpen(array());
|
2015-10-19 00:45:58 +02:00
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::formInputHidden(array(
|
2015-10-20 05:14:28 +02:00
|
|
|
'name'=>'tokenCSRF',
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$security->getTokenCSRF()
|
2015-10-19 00:45:58 +02:00
|
|
|
));
|
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::formInputText(array(
|
2015-11-07 01:23:50 +01:00
|
|
|
'name'=>'new_username',
|
2015-10-19 00:45:58 +02:00
|
|
|
'label'=>$L->g('Username'),
|
2015-11-07 01:23:50 +01:00
|
|
|
'value'=>(isset($_POST['new_username'])?$_POST['new_username']:''),
|
2018-04-27 20:36:43 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2015-10-19 00:45:58 +02:00
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::formInputText(array(
|
2015-11-07 01:23:50 +01:00
|
|
|
'name'=>'new_password',
|
2018-04-27 20:36:43 +02:00
|
|
|
'type'=>'password',
|
2015-10-19 00:45:58 +02:00
|
|
|
'label'=>$L->g('Password'),
|
|
|
|
'value'=>'',
|
2018-04-27 20:36:43 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2015-10-19 00:45:58 +02:00
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::formInputText(array(
|
2015-11-07 01:23:50 +01:00
|
|
|
'name'=>'confirm_password',
|
2018-04-27 20:36:43 +02:00
|
|
|
'type'=>'password',
|
2015-10-19 00:45:58 +02:00
|
|
|
'label'=>$L->g('Confirm Password'),
|
|
|
|
'value'=>'',
|
2018-04-27 20:36:43 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2015-10-19 00:45:58 +02:00
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::formSelect(array(
|
2015-10-19 00:45:58 +02:00
|
|
|
'name'=>'role',
|
|
|
|
'label'=>$L->g('Role'),
|
2018-08-05 17:54:20 +02:00
|
|
|
'options'=>array('editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
|
|
|
|
'selected'=>'Editor',
|
2018-04-27 20:36:43 +02:00
|
|
|
'class'=>'',
|
2015-10-19 00:45:58 +02:00
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::formInputText(array(
|
2015-10-19 00:45:58 +02:00
|
|
|
'name'=>'email',
|
|
|
|
'label'=>$L->g('Email'),
|
|
|
|
'value'=>(isset($_POST['email'])?$_POST['email']:''),
|
2018-04-27 20:36:43 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2015-10-19 00:45:58 +02:00
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
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.'users" role="button">'.$L->g('Cancel').'</a>
|
|
|
|
</div>
|
|
|
|
';
|
2015-10-19 00:45:58 +02:00
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::formClose();
|