Added the functionality to allow librarians to manipulate the flag status on borrowers
authorrangi <rangi>
Wed, 7 Mar 2001 01:48:48 +0000 (01:48 +0000)
committerrangi <rangi>
Wed, 7 Mar 2001 01:48:48 +0000 (01:48 +0000)
ie lost, debarred, and gone no address

insertdata.pl
memberentry.pl

index 343e5cb..b2d33ba 100755 (executable)
@@ -37,7 +37,8 @@ if (my $data=$sth->fetchrow_hashref){
   altrelationship='$data{'altrelationship'}',othernames='$data{'othernames'}',phoneday='$data{'phoneday'}',
   categorycode='$data{'categorycode'}',city='$data{'city'}',area='$data{'area'}',phone='$data{'phone'}',
   borrowernotes='$data{'borrowernotes'}',altphone='$data{'altphone'}',surname='$data{'surname'}',
-  initials='$data{'initials'}',streetaddress='$data{'address'}',ethnicity='$data{'ethnicity'}'
+  initials='$data{'initials'}',streetaddress='$data{'address'}',ethnicity='$data{'ethnicity'}',
+  gonenoaddress='$data{'gna'}',lost='$data{'lost'}',debarred='$data{'debarred'}'
   where borrowernumber=$data{'borrowernumber'}";
 #  print $query;
 
index 0080839..25e9630 100755 (executable)
@@ -15,11 +15,11 @@ if ($member eq ''){
   $member=NewBorrowerNumber();
 }
 my $type=$input->param('type');
-
+my $modify=$input->param('modify.x');
 print $input->header;
 print startpage();
 print startmenu('member');
-
+#print $modify;
 if ($type ne 'Add'){
   print mkheadr(1,'Update Member Details');
 } else {
@@ -371,16 +371,52 @@ print <<printend
 <td><FONT SIZE=2>Notes</font></td>
 <td  COLSPAN=4><textarea name=borrowernotes wrap=physical cols=70 rows=3>$data->{'borrowernotes'}</textarea></td></tr>
 <tr><td>&nbsp; </TD></TR>
-<tr valign=top bgcolor=white><td  COLSPAN=5 align=right >
+
+printend
+;
+if ($modify){
+  print <<printend
+<tr><td><Font size=2>FLAGS</font></td></tr>
+<tr><td>Gone No Address</td>
+<td><input type=radio name=gna value=1
 printend
 ;
-if ($type ne 'modify'){
+  if ($data->{'gonenoaddress'} eq '1'){
+    print " checked";
+  }
+print ">Yes <input type=radio name=gna value=0";
+  if ($data->{'gonenoaddress'} eq '0'){
+    print " checked";
+  }
+  print ">No</td></tr>\n";
+  print "<tr><td>Lost</td><td><input type=radio name=lost value=1";
+  if ($data->{'lost'} eq '1'){
+    print " checked";
+  }
+  print ">Yes<input type=radio name=lost value=0";
+  if ($data->{'lost'} eq '0'){
+    print " checked";
+  }
+  print ">No</td></tr>\n";
+  print "<tr><td>Debarred</td><td><input type=radio name=debarred value=1";
+  if ($data->{'debarred'} eq '1'){
+    print " checked";
+  }
+  print ">Yes<input type=radio name=debarred value=0";
+  if ($data->{'debarred'} eq '0'){
+    print " checked";
+  }
+  print ">No</td></tr>\n";
+}
+if ($type eq 'Add'){
   print <<printend
+  <tr valign=top bgcolor=white><td  COLSPAN=5 align=right >
 <input type=image src="/images/save-changes.gif"  WIDTH=188  HEIGHT=44  ALT="Add New Member" border=0 ></td>
 printend
 ;
 } else {
 print <<printend
+<tr valign=top bgcolor=white><td  COLSPAN=5 align=right >
 <input type=image src="/images/save-changes.gif"  WIDTH=188  HEIGHT=44  ALT="Add New Member" border=0 ></td>
 printend
 ;