[Koha-cvs] CVS: koha memberentry.pl,1.6.2.1,1.6.2.2
Steve Tonnesen
tonnesen at users.sourceforge.net
Thu Jun 27 23:03:05 CEST 2002
Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv16190
Modified Files:
Tag: rel-1-2
memberentry.pl
Log Message:
Ethnicity fields only show up in memberentry if any ethnic groups are entered
into the database.
Index: memberentry.pl
===================================================================
RCS file: /cvsroot/koha/koha/memberentry.pl,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -C2 -r1.6.2.1 -r1.6.2.2
*** memberentry.pl 23 May 2002 10:05:12 -0000 1.6.2.1
--- memberentry.pl 27 Jun 2002 21:03:03 -0000 1.6.2.2
***************
*** 178,182 ****
my ($categories,$labels)=ethnicitycategories();
! print $input->popup_menu(-name=>'ethnicity',
-values=>$categories,
-default=>$data->{'ethnicity'},
--- 178,184 ----
my ($categories,$labels)=ethnicitycategories();
! my $ethnicitycategoriescount=$#{$categories};
! if ($ethnicitycategoriescount>=0) {
! print $input->popup_menu(-name=>'ethnicity',
-values=>$categories,
-default=>$data->{'ethnicity'},
***************
*** 188,191 ****
--- 190,196 ----
printend
;
+ } else {
+ print "</td><td colspan=2> </td><td>\n";
+ }
($categories,$labels)=borrowercategories();
print $input->popup_menu(-name=>'categorycode',
***************
*** 196,199 ****
--- 201,213 ----
+ my $ethnicitylabels='';
+ if ($ethnicitycategoriescount>=0) {
+ $ethnicitylabels=qq|
+ <td colspan=2><FONT SIZE=2>Ethnicity</FONT></td>
+ <td colspan=2><FONT SIZE=2>Ethnicity Notes</FONT></td>
+ |;
+ } else {
+ $ethnicitylabels="<td colspan=2> </td><td colspan=2> </td>";
+ }
print <<printend
***************
*** 201,206 ****
</tr>
<tr valign=top bgcolor=white>
! <td colspan=2><FONT SIZE=2>Ethnicity</FONT></td>
! <td colspan=2><FONT SIZE=2>Ethnicity Notes</FONT></td>
<td><FONT SIZE=2>Membership Category*</FONT></td>
</tr>
--- 215,219 ----
</tr>
<tr valign=top bgcolor=white>
! $ethnicitylabels
<td><FONT SIZE=2>Membership Category*</FONT></td>
</tr>
More information about the Koha-cvs
mailing list