From a60b2d5770d302c75e2bbdef5ff29d4fea554b44 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 --- .../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 f39cf68..04bd309 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -752,23 +752,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. @@ -778,7 +787,6 @@
[% END %] - [% END %]
diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 3ef6f61..56d1be1 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -66,7 +66,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.1.4