Add weak login password message to TPAC template user/jeff/lp1013786_tpac_initial_password
authorJeff Godin <jgodin@tadl.org>
Wed, 19 Aug 2015 17:47:44 +0000 (13:47 -0400)
committerJeff Godin <jgodin@tadl.org>
Wed, 19 Aug 2015 17:47:44 +0000 (13:47 -0400)
Add a message (keyed off of URL param set by EGCatLoader) to the
update_password template notifying the user why they may have been
directed to the change password page at first login.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/src/templates/opac/myopac/update_password.tt2

index bef8b99..d75b38d 100644 (file)
@@ -1,6 +1,7 @@
 [%  PROCESS "opac/parts/header.tt2";
     PROCESS "opac/parts/misc_util.tt2";
     WRAPPER "opac/parts/myopac/base.tt2";
+    cgi = CGI.new(CGI.query_string);
     myopac_page = "prefs"  %]
 
 <h3 class="sr-only">[% l('Change Password') %]</h3>
     <div id='account-update-email-error'>
         [% |l %]Your current password was not correct.[% END %]
     </div>
+[% ELSIF cgi.param('initial') %]
+    <div id='account-update-email-error'>
+        [% |l %] Your current password may not be strong enough to protect your account. We recommend that you set a new password now. [% END %]
+    </div>
 [% END %]
 
 <form method='post' id='account-update-email' autocomplete='off'>