[Koha-cvs] CVS: koha newmember.pl,1.15,1.16

Paul POULAIN tipaul at users.sourceforge.net
Thu Sep 4 16:29:47 CEST 2003


Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv15908

Modified Files:
	newmember.pl 
Log Message:
fix for 582 (Move error message contents out of newmember.pl)

Index: newmember.pl
===================================================================
RCS file: /cvsroot/koha/koha/newmember.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** newmember.pl	10 Aug 2003 00:30:21 -0000	1.15
--- newmember.pl	4 Sep 2003 14:29:44 -0000	1.16
***************
*** 17,21 ****
  
  # FIXME - What is the correct value of "flagsrequired"?
- # FIXME - untranslatable strings here
  
  # Copyright 2000-2002 Katipo Communications
--- 17,20 ----
***************
*** 72,78 ****
  my $string = "The following compulsary fields have been left blank. "
  	. "Please push the back button and try again<p>";
! 
  if ($data{'cardnumber'} eq ''){
!     $string.=" Cardnumber<br>";
      $ok=1;
  } else {
--- 71,77 ----
  my $string = "The following compulsary fields have been left blank. "
  	. "Please push the back button and try again<p>";
! my @errors;
  if ($data{'cardnumber'} eq ''){
! 	push @errors,"cardnumber";
      $ok=1;
  } else {
***************
*** 90,120 ****
      if ($valid != 1){
          $ok=1;
!         $string.=" Invalid Cardnumber<br>";
      }
  }
  if ($data{'sex'} eq ''){
!     $string.=" Gender <br>";
      $ok=1;
  }
  if ($data{'firstname'} eq ''){
!     $string.=" Given Names<br>";
      $ok=1;
  }
  if ($data{'surname'} eq ''){
!     $string.=" Surname<br>";
      $ok=1;
  }
  if ($data{'address'} eq ''){
!     $string.=" Postal Street Address<br>";
      $ok=1;
  }
  if ($data{'city'} eq ''){
!     $string.=" Postal City<br>";
      $ok=1;
  }
  
  # Pass the ok/not ok status and the error message to the template
! $template->param(	OK=> ($ok==0),
! 			string=> $string);
  
  # If things are ok, display the confirmation page
--- 89,121 ----
      if ($valid != 1){
          $ok=1;
!     	push @errors, "invalid_cardnumber";
      }
  }
  if ($data{'sex'} eq ''){
!     push @errors, "gender";
      $ok=1;
  }
  if ($data{'firstname'} eq ''){
!     push @errors,"firstname";
      $ok=1;
  }
  if ($data{'surname'} eq ''){
!     push @errors,"surname";
      $ok=1;
  }
  if ($data{'address'} eq ''){
!     push @errors, "address";
      $ok=1;
  }
  if ($data{'city'} eq ''){
!     push @errors, "city";
      $ok=1;
  }
  
  # Pass the ok/not ok status and the error message to the template
! $template->param(	OK=> ($ok==0));
! foreach my $error (@errors) {
! 	$template->param( $error => 1);
! }
  
  # If things are ok, display the confirmation page





More information about the Koha-cvs mailing list