summaryrefslogtreecommitdiff
path: root/httemplate
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
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')
-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>