[Koha-patches] [PATCH] [SIGNED-OFF] Bug 7517: Revised Patch. Patron category types not displaying <optgroup> in dropdown.

julian.maurice at biblibre.com julian.maurice at biblibre.com
Fri Mar 2 16:50:44 CET 2012


From: Garry Collum <gcollum at gmail.com>

The patron category drop-down box does not display the general category groups as it once did.  This patch fixes the display of the optgroups.

To test. Before applying the patch, go to a patron record.  Edit the patron. Select the category drop-down in Library Management to see if the general categories appear. After the patch is applied the dropdown will show the categories.  'Child' - child categories, 'Adult' - adult categories, etc.

Fixes XHTML errors.
1. Invalid end tag for cardnumber input.
2. Extra quote in textarea.
3. The label for debarredcomment did not have a corresponding id.  There are two instances of this id field because of an 'IF' statement, this patch failed QA in the prior patch because only one of these ids was changed.

Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>
---
 .../prog/en/modules/members/memberentrygen.tt      |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
index 51a1ba1..13c4b0f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
@@ -176,7 +176,7 @@
 [% IF step == 4 || step == 5 || step == 6 || step == 2 || step == 1 %]
 [%# Only put the cardnumber if we arent showing it in the form later %]
 [% IF cardnumber %]
-<input type="hidden" name="cardnumber" value="[% cardnumber %]">
+<input type="hidden" name="cardnumber" value="[% cardnumber %]" />
 [% END %]
 [% END %]
 [% END %]
@@ -992,12 +992,12 @@
         [% FOREACH typeloo IN typeloop %]
 			[% FOREACH categoryloo IN typeloo.categoryloop %]
 				[% IF ( loop.first ) %]
-					[% IF ( categoryloo.typename_C ) %]<optgroup label="Child">[% END %]
-					[% IF ( categoryloo.typename_A ) %]<optgroup label="Adult">[% END %]
-					[% IF ( categoryloo.typename_S ) %]<optgroup label="Staff">[% END %]
-					[% IF ( categoryloo.typename_I ) %]<optgroup label="Organization">[% END %]
-					[% IF ( categoryloo.typename_P ) %]<optgroup label="Professional">[% END %]
-					[% IF ( categoryloo.typename_X ) %]<optgroup label="Statistical">[% END %]
+					[% IF ( typeloo.typename_C ) %]<optgroup label="Child">[% END %]
+					[% IF ( typeloo.typename_A ) %]<optgroup label="Adult">[% END %]
+					[% IF ( typeloo.typename_S ) %]<optgroup label="Staff">[% END %]
+					[% IF ( typeloo.typename_I ) %]<optgroup label="Organization">[% END %]
+					[% IF ( typeloo.typename_P ) %]<optgroup label="Professional">[% END %]
+					[% IF ( typeloo.typename_X ) %]<optgroup label="Statistical">[% END %]
 			    [% END %]
 				[% IF ( categoryloo.categorycodeselected ) %]
                <option value="[% categoryloo.categorycode %]" selected="selected">[% categoryloo.categoryname %]</option>
@@ -1307,9 +1307,9 @@
 				<br />
 				<label for="datedebarred" class="radio">until:</label> 
 				[% IF opduplicate %]
-				    <input type="text" name="datedebarred" id="debarred" class="debarred" value="[% datedebarred %]" onclick="this.value=''" />
+				    <input type="text" name="datedebarred" id="datedebarred" class="debarred" value="[% datedebarred %]" onclick="this.value=''" />
 				[% ELSE %]
-				    <input type="text" name="datedebarred" id="debarred" class="debarred" value="[% datedebarred %]" />
+				    <input type="text" name="datedebarred" id="datedebarred" class="debarred" value="[% datedebarred %]" />
 				[% END %]
 				<img src="[% themelang %]/lib/calendar/cal.gif" id="debarred_button" alt="Show Calendar" />
 		         <script language="JavaScript" type="text/javascript">
@@ -1326,7 +1326,7 @@
 			       [% IF ( opduplicate ) %] 
 			           <textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3" onclick="this.value=''">[% debarredcomment %]</textarea>
 			       [% ELSE %]
-				   <textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3" ">[% debarredcomment %]</textarea> 
+				   <textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3">[% debarredcomment %]</textarea> 
 			       [% END %]
 	        </li>
 
-- 
1.7.9.1



More information about the Koha-patches mailing list