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 13:27:17 -0400
commit4fd1280540e2c9b90fa59c0c32d691f5222f65d4 (patch)
tree692219bccc0afcf42363abb6025d4780d1e363e2 /httemplate
parent5372897f367498972c96f5494e142e6e11b29eb8 (diff)
RT# 82137 - Added ability for processing fee to be pain on seperate invoice.
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/config/config-process.cgi6
-rw-r--r--httemplate/elements/tr-amount_fee.html2
-rw-r--r--httemplate/elements/tr-select-payment_options.html2
3 files changed, 6 insertions, 4 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 94795de37..0ae6a0f74 100644
--- a/httemplate/elements/tr-amount_fee.html
+++ b/httemplate/elements/tr-amount_fee.html
@@ -44,7 +44,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 ID="ajax_processingfee_cell" BGCOLOR="#dddddd" STYLE="border:1px solid blue">
<FONT SIZE="+1">A processing fee of <% $processing_fee %> is being applied to this transaction.</FONT>
diff --git a/httemplate/elements/tr-select-payment_options.html b/httemplate/elements/tr-select-payment_options.html
index c5b84e756..27df9622e 100644
--- a/httemplate/elements/tr-select-payment_options.html
+++ b/httemplate/elements/tr-select-payment_options.html
@@ -60,7 +60,7 @@ Example:
$('#payment_option_row').<% $payment_option_row %>();
$('#payment_amount_row').<% $payment_amount_row %>();
- $('#ajax_processingfee_cell').hide();
+ $('#ajax_processingfee_cell').show();
if($('#payment_amount_row').is(':visible')) {
var surcharge;