From 69285847889d9b2a64c66e4482bbb5c0b34440e7 Mon Sep 17 00:00:00 2001 From: wolfpac444 Date: Wed, 19 Feb 2003 05:22:01 +0000 Subject: [PATCH] *** empty log message *** --- newimember.pl | 17 ++++++++--------- newjmember.pl | 16 ++++++++-------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/newimember.pl b/newimember.pl index a1ba427a06..e24f947521 100755 --- a/newimember.pl +++ b/newimember.pl @@ -58,35 +58,34 @@ foreach my $key (@names){ $data{$key}=$input->param($key); } -# FIXME: $ok means "not ok", but $valid really means "valid" -my $ok=0; +my $missing=0; my $string="The following compulsary fields have been left blank. Please push the back button and try again

"; if ($data{'cardnumber_institution'} !~ /\S/){ $string.="Cardnumber
"; - $ok=1; + $missing=1; } if ($data{'institution_name'} !~ /\S/){ $string.="Institution Name
"; - $ok=1; + $missing=1; } if ($data{'address'} !~ /\S/){ $string.="Postal Address
"; - $ok=1; + $missing=1; } if ($data{'city'} !~ /\S/){ $string.="City
"; - $ok=1; + $missing=1; } if ($data{'contactname'} !~ /\S/){ $string.="Contact Name"; - $ok=1; + $missing=1; } -$template->param( missingloop => ($ok==1)); +$template->param( missingloop => ($missing==1)); $template->param( string => $string); -if ($ok !=1) { +if ($missing !=1) { $data{'cardnumber_institution'} = C4::Members::fixup_cardnumber ($data{'cardnumber_institution'}); diff --git a/newjmember.pl b/newjmember.pl index 7d6fff48a5..580ca9b541 100755 --- a/newjmember.pl +++ b/newjmember.pl @@ -45,7 +45,7 @@ my @names=$input->param; foreach my $key (@names){ $data{$key}=$input->param($key); } -my $ok=0; +my $missing=0; my $string="The following compulsary fields have been left blank. Please push the back button and try again

"; @@ -58,29 +58,29 @@ for (my $i=0;$i<3;$i++){ if ($number eq ''){ if ($i == 0){ $string.=" Cardnumber
"; - $ok=1; + $missing=1; } } else { if ($firstname eq ''){ $string.=" Given Names
"; - $ok=1; + $missing=1; } if ($surname eq ''){ $string.=" Surname
"; - $ok=1; + $missing=1; } if ($dob eq ''){ $string.=" Date Of Birth
"; - $ok=1; + $missing=1; } if ($sex eq ''){ $string.=" Gender
"; - $ok=1; + $missing=1; } my $valid=checkdigit(\%env,$data{"cardnumber_child_$i"}); if ($valid != 1){ - $ok=1; $string.=" Invalid Cardnumber $number
"; + $missing=1; } } } @@ -111,7 +111,7 @@ for (my $i=0;$i<3;$i++){ } # FIXME IF main and image are not fetched by HTML::TEMPLATE get them into identsloop -$template->param( NOK => (ok==1), +$template->param( NOK => ($missing==1), main => $main, image => $image, identsloop => \@identsloop, -- 2.39.5