summaryrefslogtreecommitdiff
path: root/httemplate/config/config-process.cgi
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-06-24 13:27:17 -0400
committerChristopher Burger <burgerc@freeside.biz>2019-06-24 16:07:09 -0400
commit5ebcddd3d2cb95a02eaba0a8fc301b9c0d7e3e73 (patch)
tree0156341987cc255e6f54a286e5250d261ca50b32 /httemplate/config/config-process.cgi
parent6ceeed875a6d93495dcf0e22212e7ad86024a60b (diff)
RT# 82137 - Added ability for processing fee to be pain on seperate invoice.
Conflicts: FS/FS/Conf.pm httemplate/elements/tr-select-payment_options.html
Diffstat (limited to 'httemplate/config/config-process.cgi')
-rw-r--r--httemplate/config/config-process.cgi6
1 files changed, 4 insertions, 2 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);
}