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 <nick@bywatersolutions.com>

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This commit is contained in:
Kyle Hall 2015-12-18 19:30:13 +00:00 committed by Brendan Gallagher
parent 714899c7f8
commit 7d8b1ce269
2 changed files with 15 additions and 8 deletions

View file

@ -778,23 +778,32 @@
</fieldset>
[% END %]
[% UNLESS action == 'edit' %]
[% UNLESS action == 'edit' || hidden.defined('password') %]
<fieldset class="rows" id="memberentry_password">
<legend id="contact_legend">Contact information</legend>
[% UNLESS hidden.defined('password') %]
<div class="alert alert-info">Your password must be at least [% minpassw %] characters long.
<legend id="contact_legend">Password</legend>
[% IF Koha.Preference('minPasswordLength') || !mandatory.defined('password') %]
<div class="alert alert-info">
[% IF Koha.Preference('minPasswordLength') %]
<p>Your password must be at least [% Koha.Preference('minPasswordLength') %] characters long.</p>
[% END %]
[% UNLESS mandatory.defined('password') %]
If you do not enter a password a system generated password will be created.
[% END %]
</div>
[% END %]
[% IF mandatory.defined('password') %]
<br>You must enter a password!</div>
<ol>
<li><label for="borrower_password" class="required">Password</label>
<input type="text" name="borrower_password" id="password" />
<span class="required">Required</span>
</li>
<li><label for="borrower_password2" class="required">Confirm password</label>
<input type="text" name="borrower_password2" id="password2" />
<span class="required">Required</span>
</li>
</ol>
[% ELSE %]
<br>If you do not enter a password a system generated password will be created</div>
<ol>
<li><label for="borrower_password">Password</label>
<input type="text" name="borrower_password" id="password" />
@ -804,7 +813,6 @@
</li>
</ol>
[% END %]
[% END %]
</fieldset>
<fieldset class="rows" id="memberentry_captcha">

View file

@ -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'),