From 7d8b1ce26944345e4b1a9726065a9846c4a46cac Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 18 Dec 2015 19:30:13 +0000 Subject: [PATCH] Bug 15343 [QA Followup] - Fix issues 1) "Contact information" should be "Password" 2) Don't pass sysprefs from the script to the template, use Koha.Preference() 3) minPasswordLength is optional, we cannot always assume it is set 4) Password field when does not follow convention completely when mandatory Signed-off-by: Nick Clemens Signed-off-by: Jesse Weaver Signed-off-by: Mirko Tietgen Signed-off-by: Jonathan Druart Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com --- .../bootstrap/en/modules/opac-memberentry.tt | 22 +++++++++++++------ opac/opac-memberentry.pl | 1 - 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index 90f4b83b26..a57ab0c72f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -778,23 +778,32 @@ [% END %] - [% UNLESS action == 'edit' %] + [% UNLESS action == 'edit' || hidden.defined('password') %]
- Contact information - [% UNLESS hidden.defined('password') %] -
Your password must be at least [% minpassw %] characters long. + Password + [% IF Koha.Preference('minPasswordLength') || !mandatory.defined('password') %] +
+ [% IF Koha.Preference('minPasswordLength') %] +

Your password must be at least [% Koha.Preference('minPasswordLength') %] characters long.

+ [% END %] + [% UNLESS mandatory.defined('password') %] + If you do not enter a password a system generated password will be created. + [% END %] +
+ [% END %] + [% IF mandatory.defined('password') %] -
You must enter a password!
  1. + Required
  2. + Required
[% ELSE %] -
If you do not enter a password a system generated password will be created
  1. @@ -804,7 +813,6 @@
[% END %] - [% END %]
diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 86135cd206..a453f75144 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -67,7 +67,6 @@ $template->param( action => $action, hidden => $hidden, mandatory => $mandatory, - minpassw => C4::Context->preference('minPasswordLength'), member_titles => GetTitles() || undef, branches => GetBranchesLoop(), OPACPatronDetails => C4::Context->preference('OPACPatronDetails'), -- 2.20.1