aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-05-18 09:47:58 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-05-18 09:47:58 +0200
commit7baf75c9ee6a7ab3eaa8d35cb4709430426721cb (patch)
tree399205abab1a7ef3d4bfab5d61a07c089518ff46 /app/view/templates
parentded1b2a19ee238543d561b6f26312458d2a43974 (diff)
downloadwcms-7baf75c9ee6a7ab3eaa8d35cb4709430426721cb.tar.gz
wcms-7baf75c9ee6a7ab3eaa8d35cb4709430426721cb.zip
upgrade user password management
- add confirm password option - remove maxlength - add dedicated flash messages
Diffstat (limited to 'app/view/templates')
-rw-r--r--app/view/templates/user.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/app/view/templates/user.php b/app/view/templates/user.php
index faa44aa..31df074 100644
--- a/app/view/templates/user.php
+++ b/app/view/templates/user.php
@@ -40,15 +40,25 @@ $this->layout('layout', ['title' => 'user', 'stylesheets' => [$css . 'home.css']
<label for="cookie">Cookie conservation time <i>(In days)</i></label>
<p>When you tick the <em>remember-me</em> checkbox during login, you can choose how much time <strong>W</strong> will remember you.</p>
- <input type="password" name="password" id="password" minlength="<?= Wcms\Model::PASSWORD_MIN_LENGTH ?>" maxlength="<?= Wcms\Model::PASSWORD_MAX_LENGTH ?>">
- <label for="password">New password</label>
+ <input type="submit" value="update preferences">
- <input type="hidden" name="passwordhash" value="1">
+ </form>
+
+ <form action="<?= $this->url('userpassword') ?>" method="post">
+ <h3>Password</h3>
+
+ <label for="password1">Type your new password</label>
+ </br>
+ <input type="password" name="password1" id="password1" minlength="<?= Wcms\Model::PASSWORD_MIN_LENGTH ?>" required>
+ </br>
+ <label for="password2">Confirm password</label>
+ </br>
+ <input type="password" name="password2" id="password2" minlength="<?= Wcms\Model::PASSWORD_MIN_LENGTH ?>" required>
<p>Password have to be between <?= Wcms\Model::PASSWORD_MIN_LENGTH ?> and <?= Wcms\Model::PASSWORD_MAX_LENGTH ?> characters long.</p>
- <input type="submit" value="update preferences">
-
+ <input type="submit" value="update password">
+
</form>
</div>