Password Length Helpers
authorMichael Peters <mpeters@emeralddata.net>
Wed, 13 Mar 2013 12:31:43 +0000 (08:31 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Sat, 9 Dec 2017 19:33:24 +0000 (14:33 -0500)
This branch provides length helpers when patrons are setting or resetting
passwords.

This assumes the default 7 characters, 1 number requirement that comes stock.
You would need to change the hard coded strings if you use a different password
requirement regex in Library Settings Editor.

Signed-off-by: Michael Peters <mpeters@emeralddata.net>
Open-ILS/src/templates/opac/myopac/update_password.tt2
Open-ILS/src/templates/opac/password_reset.tt2

index bef8b99..48f490f 100644 (file)
@@ -33,6 +33,7 @@
         <tr><td>[% l('Current Password') %]</td><td><input type='password' name='current_pw'/></td></tr>
         <tr><td>[% l('New Password') %]</td><td><input type='password' name='new_pw'/></td></tr>
         <tr><td>[% l('New Password Again') %]</td><td><input type='password' name='new_pw2'/></td></tr>
+       <tr><td>[% l(' Note: Passwords must be 7 characters (or more) in length and contain at least one number.') %]</td><td></td></tr>
         <tr><td colspan='2' align='center'><input value="[% l('Submit') %]" type='submit'/></td></tr>
     </table>
 </form>
index 2856e47..6639a58 100644 (file)
@@ -15,7 +15,7 @@
         NO_MATCH => l('Passwords did not match. Please try again'),
         NOT_ACTIVE => l('This was not an active password reset request. Your password has not been reset.'),
         NOT_STRONG => l('The password you chose was not considered complex enough to protect your account. Your password has not been reset.'),
-        TWO_PASSWORDS => l('Please enter and repeat your new password.'),
+        TWO_PASSWORDS => l('Please enter and repeat your new password.  Note: Passwords must be 7 characters (or more) in length and contain at least one number.'),
         REQUEST_SUCCESS => l('Your user name or barcode has been submitted for a password reset. ' _ 
             'If a matching account with an email address is found, you will soon receive an email at that address with further instructions for resetting your password.')
     }