From 7be6b413fe4475ab58b265a5a36c06b60d7f91e2 Mon Sep 17 00:00:00 2001 From: arensb Date: Sun, 13 Oct 2002 07:51:10 +0000 Subject: [PATCH] Removed trailing whitespace. Added a FIXME comment. --- newjmember.pl | 82 ++++++++++++++++++++++++++------------------------- newmember.pl | 14 +++++---- 2 files changed, 50 insertions(+), 46 deletions(-) diff --git a/newjmember.pl b/newjmember.pl index d6c95ac383..33427d8ea2 100755 --- a/newjmember.pl +++ b/newjmember.pl @@ -1,7 +1,9 @@ #!/usr/bin/perl -#script to print confirmation screen, then if accepted calls itself to insert data +# $Id$ +#script to print confirmation screen, then if accepted calls itself to insert data +# FIXME - Yes, but what does it _do_? # Copyright 2000-2002 Katipo Communications # @@ -35,46 +37,46 @@ print $input->header; #get rest of data my %data; my @names=$input->param; -foreach my $key (@names){ - $data{$key}=$input->param($key); -} +foreach my $key (@names){ + $data{$key}=$input->param($key); +} my $ok=0; my $string="The following compulsary fields have been left blank. Please push the back button -and try again

"; +and try again

"; for (my $i=0;$i<3;$i++){ my $number=$data{"cardnumber_child_$i"}; my $firstname=$data{"firstname_child_$i"}; my $surname=$data{"surname_child_$i"}; my $dob=$data{"dateofbirth_child_$i"}; my $sex=$data{"sex_child_$i"}; - if ($number eq ''){ + if ($number eq ''){ if ($i == 0){ - $string.=" Cardnumber
"; - $ok=1; + $string.=" Cardnumber
"; + $ok=1; } } else { - if ($firstname eq ''){ - $string.=" Given Names
"; - $ok=1; - } - if ($surname eq ''){ - $string.=" Surname
"; - $ok=1; + if ($firstname eq ''){ + $string.=" Given Names
"; + $ok=1; + } + if ($surname eq ''){ + $string.=" Surname
"; + $ok=1; + } + if ($dob eq ''){ + $string.=" Date Of Birth
"; + $ok=1; } - if ($dob eq ''){ - $string.=" Date Of Birth
"; - $ok=1; + if ($sex eq ''){ + $string.=" Gender
"; + $ok=1; } - if ($sex eq ''){ - $string.=" Gender
"; - $ok=1; - } - my $valid=checkdigit(\%env,$data{"cardnumber_child_$i"}); - if ($valid != 1){ - $ok=1; + my $valid=checkdigit(\%env,$data{"cardnumber_child_$i"}); + if ($valid != 1){ + $ok=1; $string.=" Invalid Cardnumber $number
"; - } + } } } @@ -83,11 +85,11 @@ print startmenu('member'); if ($ok == 0){ print mkheadr(1,'Confirm Record'); - my $main="#99cc33"; - my $image="/images/background-mem.gif"; + my $main="#99cc33"; + my $image="/images/background-mem.gif"; for (my $i=0;$i<3;$i++){ if ($data{"cardnumber_child_$i"} ne ''){ - print mktablehdr; + print mktablehdr; print mktablerow(2,$main,bold('NEW MEMBER'),"",$image); my $name=$data{"firstname_child_$i"}.$data{"surname_child_$i"}; print mktablerow(2,'white',bold('Name'),$name); @@ -103,21 +105,21 @@ if ($ok == 0){ print mktablerow(2,'white',bold('Sex'),$sex); print mktablerow(2,'white',bold('School'),$data{"school_child_$i"}); print mktablerow(2,'white',bold('General Notes'),$data{"altnotes_child_$i"}); - + print mktableft; print "

"; } } - my $i=0; - my @inputs; - while (my ($key, $value) = each %data) { - $value=~ s/\"/%22/g; - $inputs[$i]=["hidden","$key","$value"]; - $i++; - } - $inputs[$i]=["submit","submit","submit"]; - print mkformnotable("/cgi-bin/koha/insertjdata.pl",@inputs); - + my $i=0; + my @inputs; + while (my ($key, $value) = each %data) { + $value=~ s/\"/%22/g; + $inputs[$i]=["hidden","$key","$value"]; + $i++; + } + $inputs[$i]=["submit","submit","submit"]; + print mkformnotable("/cgi-bin/koha/insertjdata.pl",@inputs); + } else { diff --git a/newmember.pl b/newmember.pl index 096e76314e..a0cbf1ba3a 100755 --- a/newmember.pl +++ b/newmember.pl @@ -1,7 +1,9 @@ #!/usr/bin/perl -#script to print confirmation screen, then if accepted calls itself to insert data +# $Id$ +#script to print confirmation screen, then if accepted calls itself to insert data +# FIXME - Yes, but what does it _do_? # Copyright 2000-2002 Katipo Communications # @@ -35,9 +37,9 @@ my $insert=$input->param('insert'); #get rest of data my %data; my @names=$input->param; -foreach my $key (@names){ - $data{$key}=$input->param($key); -} +foreach my $key (@names){ + $data{$key}=$input->param($key); +} print $input->header; print startpage(); print startmenu('member'); @@ -49,7 +51,7 @@ if ($insert eq ''){ my $string="The following compulsary fields have been left blank. Please push the back button and try again

"; if ($data{'cardnumber'} eq ''){ - + $string.=" Cardnumber
"; $ok=1; } else { @@ -156,7 +158,7 @@ if ($insert eq ''){ my @inputs; while (my ($key, $value) = each %data) { $value=~ s/\"/%22/g; - $inputs[$i]=["hidden","$key","$value"]; + $inputs[$i]=["hidden","$key","$value"]; $i++; } $inputs[$i]=["submit","submit","submit"]; -- 2.39.5