From 6c9a5fe914705526c337ae9ee9a7e7bef9911c36 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 --- .../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 90f4b83..a57ab0c 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 fcf94cf..da9e186 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.1.0