[Koha-cvs] CVS: koha memberentry.pl,1.6,1.6.2.1
Chris Cormack
rangi at users.sourceforge.net
Thu May 23 12:05:14 CEST 2002
Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv25846
Modified Files:
Tag: rel-1-2
memberentry.pl
Log Message:
Removing hardcoded ethnicity and category lists.
Fetched from the database instead.
Need to do the same for area
Index: memberentry.pl
===================================================================
RCS file: /cvsroot/koha/koha/memberentry.pl,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** memberentry.pl 9 Apr 2002 00:16:52 -0000 1.6
--- memberentry.pl 23 May 2002 10:05:12 -0000 1.6.2.1
***************
*** 9,12 ****
--- 9,13 ----
use C4::Search;
use C4::Database;
+ use C4::Koha;
my $input = new CGI;
***************
*** 172,260 ****
<tr><td> </TD></TR>
<tr valign=top bgcolor=white>
! <td colspan=2><SELECT NAME="ethnicity" SIZE="1">
printend
;
- print "<OPTION value=\" \">
- <OPTION value=european";
- if ($data->{'ethnicity'} eq 'european'){
- print " selected";
- }
- print "
- >European/Pakeha
- <OPTION value=maori";
- if ($data->{'ethnicity'} eq 'maori'){
- print " selected";
- }
- print ">Maori
- <OPTION value=asian";
- if ($data->{'ethnicity'} eq 'asian'){
- print " selected";
- }
- print ">Asian
- <OPTION value=pi";
- if ($data->{'ethnicity'} eq 'pi'){
- print " selected";
- }
- print ">Pacific Island
- <OPTION value=other";
- if ($data->{'ethnicity'} eq 'other'){
- print " selected";
- }
print <<printend
- >Other - please specify-->
- </SELECT>
</td>
<td colspan=2><input type=text name=ethnicnotes size=40 ></td>
! <td> <select name=categorycode>
! <option value="A"
printend
;
! if ($data->{'categorycode'} eq 'A'){
! print " Selected";
! }
! print ">Adult
! <option value=B";
! if ($data->{'categorycode'} eq 'B'){
! print " Selected";
! }
! print ">Homebound
! <option value=P";
! if ($data->{'categorycode'} eq 'P'){
! print " Selected";
! }
! print ">Privileged
! <option value=E";
! if ($data->{'categorycode'} eq 'E'){
! print " Selected";
! }
! print ">Senior Citizen
! <option value=W";
! if ($data->{'categorycode'} eq 'W'){
! print " Selected";
! }
! print ">Staff
! <option value=I";
! if ($data->{'categorycode'} eq 'I'){
! print " Selected";
! }
! print ">Institution
! <option value=C";
! if ($data->{'categorycode'} eq 'C'){
! print " Selected";
! }
! print ">Child
! <option value=L";
! if ($data->{'categorycode'} eq 'L'){
! print " Selected";
! }
! print ">Library
! <option value=F";
! if ($data->{'categorycode'} eq 'F'){
! print " Selected";
! }
! print ">Family";
print <<printend
! </select>
</td>
</tr>
--- 173,201 ----
<tr><td> </TD></TR>
<tr valign=top bgcolor=white>
! <td colspan=2>
printend
;
+ my ($categories,$labels)=ethnicitycategories();
+ print $input->popup_menu(-name=>'ethnicity',
+ -values=>$categories,
+ -default=>$data->{'ethnicity'},
+ -labels=>$labels);
print <<printend
</td>
<td colspan=2><input type=text name=ethnicnotes size=40 ></td>
! <td>
printend
;
! ($categories,$labels)=borrowercategories();
! print $input->popup_menu(-name=>'categorycode',
! -values=>$categories,
! -default=>$data->{'categorycode'},
! -labels=>$labels);
!
!
!
print <<printend
!
</td>
</tr>
More information about the Koha-cvs
mailing list