diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-09 17:28:31 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-09 17:28:31 -0500 |
commit | 26e3996014936268f4acbfa214fa881af9320ddd (patch) | |
tree | 5f7fa2c1b73e4443ce75e8919383bdf775492304 /app/Template/password_reset | |
parent | 03032c3190a27408d60e27f486a4ca472448e9dc (diff) |
Add forgot password feature
Diffstat (limited to 'app/Template/password_reset')
-rw-r--r-- | app/Template/password_reset/change.php | 16 | ||||
-rw-r--r-- | app/Template/password_reset/create.php | 17 | ||||
-rw-r--r-- | app/Template/password_reset/email.php | 6 |
3 files changed, 39 insertions, 0 deletions
diff --git a/app/Template/password_reset/change.php b/app/Template/password_reset/change.php new file mode 100644 index 00000000..310f0f97 --- /dev/null +++ b/app/Template/password_reset/change.php @@ -0,0 +1,16 @@ +<div class="form-login"> + <h2><?= t('Password Reset') ?></h2> + <form method="post" action="<?= $this->url->href('PasswordReset', 'update', array('token' => $token)) ?>"> + <?= $this->form->csrf() ?> + + <?= $this->form->label(t('New password'), 'password') ?> + <?= $this->form->password('password', $values, $errors) ?><br/> + + <?= $this->form->label(t('Confirmation'), 'confirmation') ?> + <?= $this->form->password('confirmation', $values, $errors) ?> + + <div class="form-actions"> + <input type="submit" value="<?= t('Change Password') ?>" class="btn btn-blue"/> + </div> + </form> +</div>
\ No newline at end of file diff --git a/app/Template/password_reset/create.php b/app/Template/password_reset/create.php new file mode 100644 index 00000000..ef958011 --- /dev/null +++ b/app/Template/password_reset/create.php @@ -0,0 +1,17 @@ +<div class="form-login"> + <h2><?= t('Password Reset') ?></h2> + <form method="post" action="<?= $this->url->href('PasswordReset', 'save') ?>"> + <?= $this->form->csrf() ?> + + <?= $this->form->label(t('Username'), 'username') ?> + <?= $this->form->text('username', $values, $errors, array('autofocus', 'required')) ?> + + <?= $this->form->label(t('Enter the text below'), 'captcha') ?> + <img src="<?= $this->url->href('Captcha', 'image') ?>"/> + <?= $this->form->text('captcha', array(), $errors, array('required')) ?> + + <div class="form-actions"> + <input type="submit" value="<?= t('Change Password') ?>" class="btn btn-blue"/> + </div> + </form> +</div>
\ No newline at end of file diff --git a/app/Template/password_reset/email.php b/app/Template/password_reset/email.php new file mode 100644 index 00000000..62788b49 --- /dev/null +++ b/app/Template/password_reset/email.php @@ -0,0 +1,6 @@ +<p><?= t('To reset your password click on this link:') ?></p> + +<p><?= $this->url->to('PasswordReset', 'change', array('token' => $token), '', true) ?></p> + +<hr> +Kanboard
\ No newline at end of file |