my $input = new CGI;
my ($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => "admin/transport-cost-matrix.tmpl",
+ = get_template_and_user({template_name => "admin/transport-cost-matrix.tt",
query => $input,
type => "intranet",
authnotrequired => 0,
$from_to_input_def{disabled} = 1;
}
else {
- push @errors, "Invalid value for $from_row{name} -> $from_to_input_def{name}"
+ push @errors, "$from_row{name} -> $from_to_input_def{name}"
unless $value =~ /\d/o && $value >= 0.0;
}
}
if ( my $cell = $cost_matrix->{$tocode}{$fromcode} ) {
$from_to_input_def{value} = $cell->{cost};
$from_to_input_def{disabled} = 1 if $cell->{disable_transfer};
+ } else {
+ # matrix has been previously initialized, but a branch referenced here was created afterward.
+ $from_to_input_def{disabled} = 1;
}
} else {
+ # First time initializing the matrix
$from_to_input_def{disabled} = 1;
}
}