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

66 lines
1.6 KiB
PHP
Raw Normal View History

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