summaryrefslogtreecommitdiff
path: root/app/Template/user_credential
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-18 21:27:36 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-18 21:27:36 -0400
commitbfd59d9e544028a1ea041806fd60e112f3a90167 (patch)
tree0576ae4c6a948cd6af882b23da6073dfef1cae2c /app/Template/user_credential
parent0830fe22b777e419e42cfb3349e61098be9e4127 (diff)
Reset failed login counter and unlock user when changing password
Diffstat (limited to 'app/Template/user_credential')
-rw-r--r--app/Template/user_credential/authentication.php27
-rw-r--r--app/Template/user_credential/password.php23
2 files changed, 50 insertions, 0 deletions
diff --git a/app/Template/user_credential/authentication.php b/app/Template/user_credential/authentication.php
new file mode 100644
index 00000000..fbe2e915
--- /dev/null
+++ b/app/Template/user_credential/authentication.php
@@ -0,0 +1,27 @@
+<div class="page-header">
+ <h2><?= t('Edit Authentication') ?></h2>
+</div>
+<form method="post" action="<?= $this->url->href('UserCredentialController', 'saveAuthentication', array('user_id' => $user['id'])) ?>" autocomplete="off">
+ <?= $this->form->csrf() ?>
+
+ <?= $this->form->hidden('id', $values) ?>
+ <?= $this->form->hidden('username', $values) ?>
+
+ <?= $this->hook->render('template:user:authentication:form', array('values' => $values, 'errors' => $errors, 'user' => $user)) ?>
+
+ <?= $this->form->checkbox('is_ldap_user', t('Remote user'), 1, isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1) ?>
+ <?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?>
+
+ <div class="form-actions">
+ <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
+ </div>
+
+ <div class="alert alert-info">
+ <ul>
+ <li><?= t('Remote users do not store their password in Kanboard database, examples: LDAP, Google and Github accounts.') ?></li>
+ <li><?= t('If you check the box "Disallow login form", credentials entered in the login form will be ignored.') ?></li>
+ </ul>
+ </div>
+</form>
diff --git a/app/Template/user_credential/password.php b/app/Template/user_credential/password.php
new file mode 100644
index 00000000..5a6e4403
--- /dev/null
+++ b/app/Template/user_credential/password.php
@@ -0,0 +1,23 @@
+<div class="page-header">
+ <h2><?= t('Password modification') ?></h2>
+</div>
+
+<form method="post" action="<?= $this->url->href('UserCredentialController', 'savePassword', array('user_id' => $user['id'])) ?>" autocomplete="off">
+ <?= $this->form->hidden('id', $values) ?>
+ <?= $this->form->csrf() ?>
+
+ <?= $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) ?>
+
+ <?= $this->form->label(t('Confirmation'), 'confirmation') ?>
+ <?= $this->form->password('confirmation', $values, $errors) ?>
+
+ <div class="form-actions">
+ <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
+ </div>
+</form>