koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha memberentry.pl,1.6,1.7


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha memberentry.pl,1.6,1.7
Date: Thu, 04 Jul 2002 06:53:58 -0700

Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv5233

Modified Files:
        memberentry.pl 
Log Message:
merging 1.2 and main branches. main branch now uses ethnicity SQL table


Index: memberentry.pl
===================================================================
RCS file: /cvsroot/koha/koha/memberentry.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** memberentry.pl      9 Apr 2002 00:16:52 -0000       1.6
--- memberentry.pl      4 Jul 2002 13:53:56 -0000       1.7
***************
*** 9,12 ****
--- 9,13 ----
  use C4::Search;
  use C4::Database;
+ use C4::Koha;
  
  my $input = new CGI;
***************
*** 172,265 ****
  <tr><td>&nbsp; </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>                                                                         
                                                                                
                                                                                
                                                                                
                                        
  <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>
--- 173,219 ----
  <tr><td>&nbsp; </TD></TR>
  <tr valign=top bgcolor=white>
! <td colspan=2>
  printend
  ;
  
+ my ($categories,$labels)=ethnicitycategories();
+ my $ethnicitycategoriescount=$#{$categories};
+ if ($ethnicitycategoriescount>=0) {
+       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
  ;
! } else {
!       print "</td><td colspan=2>&nbsp;</td><td>\n";
  }
! ($categories,$labels)=borrowercategories();
! print $input->popup_menu(-name=>'categorycode',
!                               -values=>$categories,
!                               -default=>$data->{'categorycode'},
!                               -labels=>$labels);
! 
! 
! 
! 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>&nbsp;</td><td colspan=2>&nbsp;</td>";
  }
  print <<printend
! 
  </td>
  </tr>                                                                         
                                                                                
                                                                                
                                                                                
                                        
  <tr valign=top bgcolor=white>
! $ethnicitylabels
  <td><FONT SIZE=2>Membership Category*</FONT></td>
  </tr>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]