summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/config/config-process.cgi6
-rw-r--r--httemplate/elements/tr-amount_fee.html2
2 files changed, 5 insertions, 3 deletions
diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi
index d84edce00..6af7d2322 100644
--- a/httemplate/config/config-process.cgi
+++ b/httemplate/config/config-process.cgi
@@ -155,7 +155,9 @@ foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) {
}
} elsif ( $type eq 'checkbox' ) {
if ( defined $cgi->param($i->key.$n) ) {
- push @touch, $i->key;
+ my $error = &{$i->validate}('', $n) if $i->validate;
+ push @error, $error if $error;
+ push @touch, $i->key if !$error;
} else {
push @delete, $i->key;
}
@@ -167,7 +169,7 @@ foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) {
if ( scalar(@{[ $cgi->param($i->key.$n) ]}) && $cgi->param($i->key.$n) ne '' ) {
my $error = &{$i->validate}([ $cgi->param($i->key.$n) ], $n) if $i->validate;
push @error, $error if $error;
- $conf->set($i->key, join("\n", @{[ $cgi->param($i->key.$n) ]} ), $agentnum);
+ $conf->set($i->key, join("\n", @{[ $cgi->param($i->key.$n) ]} ), $agentnum) if !$error;
} else {
$conf->delete($i->key, $agentnum);
}
diff --git a/httemplate/elements/tr-amount_fee.html b/httemplate/elements/tr-amount_fee.html
index 1cd59bbc3..31877f119 100644
--- a/httemplate/elements/tr-amount_fee.html
+++ b/httemplate/elements/tr-amount_fee.html
@@ -38,7 +38,7 @@
<TD>
<TABLE><TR>
<TD BGCOLOR="#ffffff">
- <INPUT TYPE="checkbox" NAME="processing_fee" ID="processing_fee" VALUE="<% $processing_fee %>" onclick="<% $opt{prefix} %>process_fee_changed()">
+ <INPUT TYPE="checkbox" NAME="processing_fee" ID="processing_fee" VALUE="<% $processing_fee %>" onclick="<% $opt{prefix} %>process_fee_changed()" checked>
</TD>
<TD>
Apply a processing fee of <% $processing_fee %> .</FONT>