2015-09-08 02:51:48 +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-23 03:45:54 +02:00
2015-09-30 03:59:02 +02:00
< ? php if ( $_user [ 'username' ] == 'admin' ) { ?>
2015-07-22 05:15:02 +02:00
< li >< a href = " #delete " >< ? php $Language -> p ( 'Delete' ) ?> </a></li>
2015-07-23 03:45:54 +02:00
< ? php } ?>
2015-05-05 03:00:01 +02:00
</ ul >
</ nav >
<!-- ===================================== -->
<!-- Profile -->
<!-- ===================================== -->
< div id = " profile " >
2015-10-06 15:52:16 +02:00
< form method = " post " action = " " class = " forms " enctype = " multipart/form-data " >
2015-09-08 02:51:48 +02:00
< input type = " hidden " id = " jstoken " name = " token " value = " <?php $Security->printToken () ?> " >
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-10-06 15:52:16 +02:00
<!-- Picture -->
< label >
< ? php $Language -> p ( 'Profile picture' ) ?> <br/>
< ? php if ( $_user [ 'picture' ]) { ?>
< img id = " profilePicture " src = " <?php echo HTML_PATH_PICTURES.trim( $_user['username'] ).'.'. $_user['picture'] .'?'. $_user['updated'] ?> " >
< ? php } ?>
< input type = " file " name = " profilePicture " id = " fileToUpload " >
</ label >< br />
2015-05-05 03:00:01 +02:00
2015-07-23 04:16:42 +02:00
< ? php if ( $Login -> username () === 'admin' ) { ?>
2015-05-15 00:07:45 +02:00
< 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-07-23 04:16:42 +02:00
< ? php } ?>
2015-09-30 03:59:02 +02:00
< input type = " submit " class = " btn btn-blue " value = " <?php $Language->p ('Save') ?> " name = " edit-user " >
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-09-30 03:59:02 +02:00
< input type = " hidden " id = " jstoken " name = " token " value = " <?php $Security->printToken () ?> " >
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-09-30 03:59:02 +02:00
< input type = " submit " class = " btn btn-blue " value = " <?php $Language->p ('Save') ?> " name = " edit-user " >
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-09-30 03:59:02 +02:00
< input type = " hidden " id = " jstoken " name = " token " value = " <?php $Security->printToken () ?> " >
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-09-30 03:59:02 +02:00
< input type = " submit " class = " btn btn-blue " value = " <?php $Language->p ('Save') ?> " name = " change-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 -->
<!-- ===================================== -->
2015-09-30 03:59:02 +02:00
< ? php if ( $_user [ 'username' ] == 'admin' ) { ?>
2015-07-22 05:15:02 +02:00
< div id = " delete " >
< form method = " post " action = " " class = " forms " >
2015-09-30 03:59:02 +02:00
< input type = " hidden " id = " jstoken " name = " token " value = " <?php $Security->printToken () ?> " >
2015-07-22 05:15:02 +02:00
< input type = " hidden " name = " username " value = " <?php echo $_user['username'] ?> " >
2015-09-30 03:59:02 +02:00
< p >< input type = " submit " name = " delete-user-all " class = " btn btn-blue " value = " <?php $Language->p ('Delete the user and all its posts') ?> " ></ p >
2015-07-22 05:15:02 +02:00
</ form >
< form method = " post " action = " " class = " forms " >
2015-09-30 03:59:02 +02:00
< input type = " hidden " id = " jstoken " name = " token " value = " <?php $Security->printToken () ?> " >
2015-07-22 05:15:02 +02:00
< input type = " hidden " name = " username " value = " <?php echo $_user['username'] ?> " >
2015-09-30 03:59:02 +02:00
< p >< input type = " submit " name = " delete-user-associate " class = " btn btn-blue " value = " <?php $Language->p ('Delete the user and associate its posts to admin user') ?> " ></ p >
2015-07-22 05:15:02 +02:00
</ form >
< a href = " <?php echo HTML_PATH_ADMIN_ROOT.'users' ?> " class = " btn " >< ? php $Language -> p ( 'Cancel' ) ?> </a>
2015-07-23 03:45:54 +02:00
</ div >
2015-10-06 15:52:16 +02:00
< ? php } ?>