diff --git a/C4/Input.pm b/C4/Input.pm
index 0d12ae8..0b4c086 100644
--- a/C4/Input.pm
+++ b/C4/Input.pm
@@ -49,7 +49,7 @@ my $priv_func = sub {
# make all your functions, whether exported or not;
sub checkflds {
- my ($reqflds,$data) = @_;
+ my ($env,$reqflds,$data) = @_;
my $numrflds = @$reqflds;
my @probarr;
my $i = 0;
@@ -57,27 +57,31 @@ sub checkflds {
if ($data->{@$reqflds[$i]} eq "") {
push(@probarr, @$reqflds[$i]);
}
+ $i++
}
return (\@probarr);
}
sub checkdigit {
- my ($infl) = @_;
+ my ($env,$infl) = @_;
$infl = uc $infl;
- my @weightings = (9,4,6,3,5,2,1);
+ my @weightings = (8,4,6,3,5,2,1);
my $sum;
my $i = 1;
my $valid = 0;
+ # print $infl."
";
while ($i <8) {
- $sum = $sum + $weightings[$i-1] * substr($infl,$i,1);
- print "$i\t$infl\t$sum\t$weightings[$i-1]\t".substr($infl,$i,1)."\n";
+ my $temp1 = $weightings[$i-1];
+ my $temp2 = substr($infl,$i,1);
+ $sum = $sum + ($temp1*$temp2);
+ # print "$sum $temp1 $temp2
";
$i++;
}
my $rem = ($sum%11);
- print $rem;
if ($rem == 10) {
$rem = "X";
}
+ #print $rem."
";
if ($rem eq substr($infl,8,1)) {
$valid = 1;
}
diff --git a/C4/Output.pm b/C4/Output.pm
index cf31619..d31c1be 100644
--- a/C4/Output.pm
+++ b/C4/Output.pm
@@ -166,9 +166,18 @@ sub mkform2{
$text="$data[1]
$data[2]";
} elsif ($data[0] eq 'text') {
- $text="";
+ my $size = $data[1];
+ if ($size eq "") {
+ $size=40;
+ }
+ $text="";
} elsif ($data[0] eq 'textarea') {
- $text="";
+ my @size=split("x",$data[1]);
+ if ($data[1] eq "") {
+ $size[0] = 40;
+ $size[1] = 4;
+ }
+ $text="";
} elsif ($data[0] eq 'select') {
$text="