Tweaking holds screen, trying to get additional patron information to show up in...
[koha_fer] / members / memberentry.pl
index 1dd216a..e5fe443 100755 (executable)
@@ -101,11 +101,12 @@ $category_type="A" unless $category_type; # FIXME we should display a error mess
 
 my %newdata;
 if ($op eq 'insert' || $op eq 'modify' || $op eq 'save') {
-  my @names=($borrower_data?keys %$borrower_data:$input->param());
-  foreach my $key (@names){
-    $newdata{$key}=$input->param($key)||'';
-    $newdata{$key}=~ s/\"/"/gg unless $key eq 'borrowernotes' or $key eq 'opacnote';
-  }
+    
+    my @names= $borrower_data && $op ne 'save' ? keys %$borrower_data : $input->param();
+    foreach my $key (@names) {
+        $newdata{$key} = $input->param($key) || '';
+        $newdata{$key} =~ s/\"/"/gg unless $key eq 'borrowernotes' or $key eq 'opacnote';
+    }
 
 
   # WARN : some tests must be done whatever the step, because the librarian can click on any tab.
@@ -261,8 +262,8 @@ if ($nok){
   if ($data{'sex'} eq 'F'){
     $template->param(female => 1);
   } elsif ($data{'sex'} eq 'M'){
-     $template->param(mail => 1);
-  } else ($data{'sex'} eq 'N'){
+     $template->param(male => 1);
+  } else {
      $template->param(none => 1);
   }
   my ($categories,$labels)=ethnicitycategories();