[Koha-cvs] koha/members memberentry.pl [rel_3_0]

Bruno Toumi btoumi at ouestprovence.fr
Mon Sep 18 15:57:36 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Bruno Toumi <btoumi>	06/09/18 13:57:35

Modified files:
	members        : memberentry.pl 

Log message:
	add condition : to load all data from borrowers table
	only if you are in modify borrowers mode

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/members/memberentry.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.38&r2=1.38.2.1

Patches:
Index: memberentry.pl
===================================================================
RCS file: /sources/koha/koha/members/memberentry.pl,v
retrieving revision 1.38
retrieving revision 1.38.2.1
diff -u -b -r1.38 -r1.38.2.1
--- memberentry.pl	21 Jul 2006 09:57:30 -0000	1.38
+++ memberentry.pl	18 Sep 2006 13:57:35 -0000	1.38.2.1
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: memberentry.pl,v 1.38 2006/07/21 09:57:30 toins Exp $
+# $Id: memberentry.pl,v 1.38.2.1 2006/09/18 13:57:35 btoumi Exp $
 
 # Copyright 2006 SAN OUEST PROVENCE et Paul POULAIN
 #
@@ -70,13 +70,12 @@
 my $nodouble=$input->param('nodouble');
 my $select_city=$input->param('select_city');
 my $nok=$input->param('nok');
-
 my @errors;
 my $default_city;
 # $check_categorytype contains the value of duplicate borrowers category type to redirect in good template in step =2
 my $check_categorytype=$input->param('check_categorytype');
 # NOTE: Alert for ethnicity and ethnotes fields, they are unvalided in all borrowers form
-
+my $borrower_data;
 
 #function  to automatic setup the mandatory  fields (visual with css)
 my $check_BorrowerMandatoryField=C4::Context->preference("BorrowerMandatoryField");
@@ -87,14 +86,15 @@
 
 $template->param("add"=>1) if ($op eq 'add');
 $template->param( "checked" => 1) if ($nodouble eq 1);
+($borrower_data=borrdata('',$borrowernumber)) if($op eq 'modify');
 
-my $borrower_data=borrdata('',$borrowernumber);
 # if a add or modify is requested => check validity of data.
 if ($step eq 0){
     foreach my $column (keys %$borrower_data){
 	$data{$column}=$borrower_data->{$column};
     }
    }    
+
 if ($op eq 'add' or $op eq 'modify') {
 	my @names=$input->param;
 	foreach my $key (@names){
@@ -157,8 +157,11 @@
                 }
 	
 	}
+
 # STEP 2
 	if ($step eq 2) {
+	
+	
 			if ( ($data{'userid'} eq '')){
 				my $onefirstnameletter=substr($data{'firstname'},0,1);
 				my $fivesurnameletter=substr($data{'surname'},0,5);





More information about the Koha-cvs mailing list