Bug 11342: fix error in OPAC self registration form if BorrowersTitles is empty

If BorrowersTitles is empty, it causes the library pulldown on the self
registration page to be empty, and to have the "Saluation" field have
the option "branches".

This patch also fixes a minor string capitalization issue.

Test Plan:
1) Enable OPAC self registration
2) Set the system preference BorrowersTitles to be empty
3) View the self registration page
4) Note the lack of branches in the home library pulldown
5) Apply this patch
6) Note the branches now display in the pulldown

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested in bootstrap and prog OPAC, with BorrowersTitle configured
and emptied.
Passes all tests and QA script.

Note: The titles pull down has 2 empty entries in master with
and without the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Kyle Hall 2013-12-05 09:13:35 -05:00 committed by Galen Charlton
parent b529ca00e0
commit 9a5f737dcb
3 changed files with 5 additions and 5 deletions

View file

@ -68,7 +68,7 @@
[% ELSE %] [% ELSE %]
<label for="borrower_branchcode"> <label for="borrower_branchcode">
[% END %] [% END %]
Home Library:</label> Home library:</label>
<select id="borrower_branchcode" name="borrower_branchcode"> <select id="borrower_branchcode" name="borrower_branchcode">
[% FOREACH b IN branches %] [% FOREACH b IN branches %]
@ -100,7 +100,7 @@
<legend id="identity_legend">Identity</legend> <legend id="identity_legend">Identity</legend>
<ol> <ol>
[% UNLESS hidden.defined('title') %] [% UNLESS hidden.defined('title') || !member_titles %]
<li> <li>
[% IF mandatory.defined('title') %] [% IF mandatory.defined('title') %]
<label for="borrower_title" class="required"> <label for="borrower_title" class="required">

View file

@ -77,7 +77,7 @@
[% ELSE %] [% ELSE %]
<label for="borrower_branchcode"> <label for="borrower_branchcode">
[% END %] [% END %]
Home Library:</label> Home library:</label>
<select id="borrower_branchcode" name="borrower_branchcode"> <select id="borrower_branchcode" name="borrower_branchcode">
[% FOREACH b IN branches %] [% FOREACH b IN branches %]
@ -107,7 +107,7 @@
<legend id="identity_legend">Identity</legend> <legend id="identity_legend">Identity</legend>
<ol> <ol>
[% UNLESS hidden.defined('title') %] [% UNLESS hidden.defined('title') || !member_titles %]
<li> <li>
[% IF mandatory.defined('title') %] [% IF mandatory.defined('title') %]
<label for="borrower_title" class="required"> <label for="borrower_title" class="required">

View file

@ -59,7 +59,7 @@ $template->param(
action => $action, action => $action,
hidden => GetHiddenFields(), hidden => GetHiddenFields(),
mandatory => GetMandatoryFields($action), mandatory => GetMandatoryFields($action),
member_titles => GetTitles(), member_titles => GetTitles() || undef,
branches => GetBranchesLoop(), branches => GetBranchesLoop(),
OPACPatronDetails => C4::Context->preference('OPACPatronDetails'), OPACPatronDetails => C4::Context->preference('OPACPatronDetails'),
); );