2015-07-04 00:36:37 +02:00
|
|
|
<h2 class="title"><i class="fa fa-user"></i> <?php $Language->p('Edit user') ?></h2>
|
2015-05-05 03:00:01 +02:00
|
|
|
|
|
|
|
<nav class="navbar nav-pills sublinks" data-tools="tabs" data-active="#profile">
|
|
|
|
<ul>
|
2015-07-04 00:36:37 +02:00
|
|
|
<li><a href="#profile"><?php $Language->p('Profile') ?></a></li>
|
|
|
|
<li><a href="#email"><?php $Language->p('Email') ?></a></li>
|
|
|
|
<li><a href="#password"><?php $Language->p('Password') ?></a></li>
|
2015-07-22 05:15:02 +02:00
|
|
|
<li><a href="#delete"><?php $Language->p('Delete') ?></a></li>
|
2015-05-05 03:00:01 +02:00
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
<!-- ===================================== -->
|
|
|
|
<!-- Profile -->
|
|
|
|
<!-- ===================================== -->
|
|
|
|
|
|
|
|
<div id="profile">
|
|
|
|
<form method="post" action="" class="forms">
|
2015-07-22 05:15:02 +02:00
|
|
|
<input type="hidden" name="edit-user" value="true">
|
2015-05-05 03:00:01 +02:00
|
|
|
<input type="hidden" name="username" value="<?php echo $_user['username'] ?>">
|
|
|
|
|
|
|
|
<label>
|
2015-07-04 00:36:37 +02:00
|
|
|
<?php $Language->p('First name') ?>
|
2015-05-05 03:00:01 +02:00
|
|
|
<input type="text" name="firstName" class="width-50" value="<?php echo $_user['firstName'] ?>">
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label>
|
2015-07-04 00:36:37 +02:00
|
|
|
<?php $Language->p('Last name') ?>
|
2015-05-05 03:00:01 +02:00
|
|
|
<input type="text" name="lastName" class="width-50" value="<?php echo $_user['lastName'] ?>">
|
|
|
|
</label>
|
|
|
|
|
2015-05-15 00:07:45 +02:00
|
|
|
<?php
|
|
|
|
if($Login->username()==='admin')
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
<label for="role">
|
2015-07-04 00:36:37 +02:00
|
|
|
<?php $Language->p('Role') ?>
|
2015-05-05 03:00:01 +02:00
|
|
|
<select name="role" class="width-50">
|
|
|
|
<?php
|
2015-07-04 00:36:37 +02:00
|
|
|
$htmlOptions = array('admin'=>$Language->get('Administrator'), 'editor'=>$Language->get('Editor'));
|
2015-05-05 03:00:01 +02:00
|
|
|
foreach($htmlOptions as $value=>$text) {
|
|
|
|
echo '<option value="'.$value.'"'.( ($_user['role']===$value)?' selected="selected"':'').'>'.$text.'</option>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
2015-07-04 00:36:37 +02:00
|
|
|
<div class="forms-desc"><?php $Language->p('you-can-choose-the-users-privilege') ?></div>
|
2015-05-05 03:00:01 +02:00
|
|
|
</label>
|
2015-05-15 00:07:45 +02:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
2015-07-20 05:14:12 +02:00
|
|
|
<input type="submit" class="btn btn-blue" value="<?php $Language->p('Save') ?>" name="user-profile">
|
2015-07-04 00:36:37 +02:00
|
|
|
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
|
2015-05-05 03:00:01 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- ===================================== -->
|
|
|
|
<!-- E-mail -->
|
|
|
|
<!-- ===================================== -->
|
|
|
|
|
|
|
|
<div id="email">
|
|
|
|
<form method="post" action="" class="forms">
|
2015-07-22 05:15:02 +02:00
|
|
|
<input type="hidden" name="edit-user" value="true">
|
2015-05-05 03:00:01 +02:00
|
|
|
<input type="hidden" name="username" value="<?php echo $_user['username'] ?>">
|
|
|
|
|
|
|
|
<label>
|
2015-07-04 00:36:37 +02:00
|
|
|
<?php $Language->p('Email') ?>
|
2015-05-05 03:00:01 +02:00
|
|
|
<input type="text" name="email" class="width-50" value="<?php echo $_user['email'] ?>">
|
2015-07-04 00:36:37 +02:00
|
|
|
<div class="forms-desc"><?php $Language->p('email-will-not-be-publicly-displayed') ?></div>
|
2015-05-05 03:00:01 +02:00
|
|
|
</label>
|
|
|
|
|
2015-07-20 05:14:12 +02:00
|
|
|
<input type="submit" class="btn btn-blue" value="<?php $Language->p('Save') ?>" name="user-email">
|
2015-07-04 00:36:37 +02:00
|
|
|
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
|
2015-05-05 03:00:01 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- ===================================== -->
|
|
|
|
<!-- Password -->
|
|
|
|
<!-- ===================================== -->
|
|
|
|
|
|
|
|
<div id="password">
|
|
|
|
<form method="post" action="" class="forms">
|
2015-07-22 05:15:02 +02:00
|
|
|
<input type="hidden" name="change-password" value="true">
|
2015-05-05 03:00:01 +02:00
|
|
|
<input type="hidden" name="username" value="<?php echo $_user['username'] ?>">
|
|
|
|
|
|
|
|
<label>
|
2015-07-04 00:36:37 +02:00
|
|
|
<?php $Language->p('New password') ?>
|
2015-05-05 03:00:01 +02:00
|
|
|
<input type="password" name="password" class="width-50">
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label>
|
2015-07-04 00:36:37 +02:00
|
|
|
<?php $Language->p('Confirm password') ?>
|
2015-05-05 03:00:01 +02:00
|
|
|
<input type="password" name="confirm-password" class="width-50">
|
|
|
|
</label>
|
|
|
|
|
2015-07-20 05:14:12 +02:00
|
|
|
<input type="submit" class="btn btn-blue" value="<?php $Language->p('Save') ?>" name="user-password">
|
2015-07-04 00:36:37 +02:00
|
|
|
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
|
2015-05-05 03:00:01 +02:00
|
|
|
</form>
|
2015-07-22 05:15:02 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- ===================================== -->
|
|
|
|
<!-- Delete -->
|
|
|
|
<!-- ===================================== -->
|
|
|
|
|
|
|
|
<div id="delete">
|
|
|
|
|
|
|
|
<form method="post" action="" class="forms">
|
|
|
|
<input type="hidden" name="delete-user-all" value="true">
|
|
|
|
<input type="hidden" name="username" value="<?php echo $_user['username'] ?>">
|
|
|
|
<p><input type="submit" class="btn btn-blue" value="Delete the user and all your content"></p>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<form method="post" action="" class="forms">
|
|
|
|
<input type="hidden" name="delete-user-associate" value="true">
|
|
|
|
<input type="hidden" name="username" value="<?php echo $_user['username'] ?>">
|
|
|
|
<p><input type="submit" class="btn btn-blue" value="Delete the user and the content associate to admin user"></p>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
|
|
|
|
|
2015-07-04 00:36:37 +02:00
|
|
|
</div>
|