diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/user_credential/authentication.php (renamed from app/Template/user_view/authentication.php) | 2 | ||||
-rw-r--r-- | app/Template/user_credential/password.php (renamed from app/Template/user_view/password.php) | 9 | ||||
-rw-r--r-- | app/Template/user_modification/show.php (renamed from app/Template/user_view/edit.php) | 2 | ||||
-rw-r--r-- | app/Template/user_view/show.php | 4 | ||||
-rw-r--r-- | app/Template/user_view/sidebar.php | 16 |
5 files changed, 17 insertions, 16 deletions
diff --git a/app/Template/user_view/authentication.php b/app/Template/user_credential/authentication.php index 44643388..fbe2e915 100644 --- a/app/Template/user_view/authentication.php +++ b/app/Template/user_credential/authentication.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Edit Authentication') ?></h2> </div> -<form method="post" action="<?= $this->url->href('UserViewController', 'authentication', array('user_id' => $user['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('UserCredentialController', 'saveAuthentication', array('user_id' => $user['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> diff --git a/app/Template/user_view/password.php b/app/Template/user_credential/password.php index 32ff9d5c..5a6e4403 100644 --- a/app/Template/user_view/password.php +++ b/app/Template/user_credential/password.php @@ -2,15 +2,12 @@ <h2><?= t('Password modification') ?></h2> </div> -<form method="post" action="<?= $this->url->href('UserViewController', 'password', array('user_id' => $user['id'])) ?>" autocomplete="off"> - +<form method="post" action="<?= $this->url->href('UserCredentialController', 'savePassword', array('user_id' => $user['id'])) ?>" autocomplete="off"> <?= $this->form->hidden('id', $values) ?> <?= $this->form->csrf() ?> - <div class="alert alert-error"> - <?= $this->form->label(t('Current password for the user "%s"', $this->user->getFullname()), 'current_password') ?> - <?= $this->form->password('current_password', $values, $errors) ?> - </div> + <?= $this->form->label(t('Current password for the user "%s"', $this->user->getFullname()), 'current_password') ?> + <?= $this->form->password('current_password', $values, $errors) ?> <?= $this->form->label(t('New password for the user "%s"', $this->user->getFullname($user)), 'password') ?> <?= $this->form->password('password', $values, $errors) ?> diff --git a/app/Template/user_view/edit.php b/app/Template/user_modification/show.php index 18947905..396d550d 100644 --- a/app/Template/user_view/edit.php +++ b/app/Template/user_modification/show.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Edit user') ?></h2> </div> -<form method="post" action="<?= $this->url->href('UserViewController', 'edit', array('user_id' => $user['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('UserModificationController', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> diff --git a/app/Template/user_view/show.php b/app/Template/user_view/show.php index df0affb8..390a1e45 100644 --- a/app/Template/user_view/show.php +++ b/app/Template/user_view/show.php @@ -15,6 +15,10 @@ <li><?= t('Role:') ?> <strong><?= $this->user->getRoleName($user['role']) ?></strong></li> <li><?= t('Account type:') ?> <strong><?= $user['is_ldap_user'] ? t('Remote') : t('Local') ?></strong></li> <li><?= $user['twofactor_activated'] == 1 ? t('Two factor authentication enabled') : t('Two factor authentication disabled') ?></li> + <li><?= t('Number of failed login:') ?> <strong><?= $user['nb_failed_login'] ?></strong></li> + <?php if ($user['lock_expiration_date'] != 0): ?> + <li><?= t('Account locked until:') ?> <strong><?= $this->dt->datetime($user['lock_expiration_date']) ?></strong></li> + <?php endif ?> </ul> <div class="page-header"> diff --git a/app/Template/user_view/sidebar.php b/app/Template/user_view/sidebar.php index 9a25df16..5eb0457b 100644 --- a/app/Template/user_view/sidebar.php +++ b/app/Template/user_view/sidebar.php @@ -33,9 +33,9 @@ <ul> <?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?> - <?php if ($this->user->hasAccess('UserViewController', 'edit')): ?> - <li <?= $this->app->checkMenuSelection('UserViewController', 'edit') ?>> - <?= $this->url->link(t('Edit profile'), 'UserViewController', 'edit', array('user_id' => $user['id'])) ?> + <?php if ($this->user->hasAccess('UserModificationController', 'show')): ?> + <li <?= $this->app->checkMenuSelection('UserModificationController', 'show') ?>> + <?= $this->url->link(t('Edit profile'), 'UserModificationController', 'show', array('user_id' => $user['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AvatarFile') ?>> <?= $this->url->link(t('Avatar'), 'AvatarFile', 'show', array('user_id' => $user['id'])) ?> @@ -43,8 +43,8 @@ <?php endif ?> <?php if ($user['is_ldap_user'] == 0): ?> - <li <?= $this->app->checkMenuSelection('UserViewController', 'password') ?>> - <?= $this->url->link(t('Change password'), 'UserViewController', 'password', array('user_id' => $user['id'])) ?> + <li <?= $this->app->checkMenuSelection('UserCredentialController', 'changePassword') ?>> + <?= $this->url->link(t('Change password'), 'UserCredentialController', 'changePassword', array('user_id' => $user['id'])) ?> </li> <?php endif ?> @@ -72,9 +72,9 @@ </li> <?php endif ?> - <?php if ($this->user->hasAccess('UserViewController', 'authentication')): ?> - <li <?= $this->app->checkMenuSelection('UserViewController', 'authentication') ?>> - <?= $this->url->link(t('Edit Authentication'), 'UserViewController', 'authentication', array('user_id' => $user['id'])) ?> + <?php if ($this->user->hasAccess('UserCredentialController', 'changeAuthentication')): ?> + <li <?= $this->app->checkMenuSelection('UserCredentialController', 'changeAuthentication') ?>> + <?= $this->url->link(t('Edit Authentication'), 'UserCredentialController', 'changeAuthentication', array('user_id' => $user['id'])) ?> </li> <?php endif ?> |