From a2253aacd9b6c142236fb800f1c74b04510000f9 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 12 Apr 2011 02:51:50 +0000 Subject: [PATCH] add disable_payauto_default conf, RT#12431 --- FS/FS/Conf.pm | 8 ++++++++ httemplate/edit/cust_main/billing.html | 12 ++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 15d64bc59..43e7aaa3d 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -4387,6 +4387,14 @@ and customer address. Include units.', 'select_enum' => [ '', '7', 'EmulateIE7', '8', 'EmulateIE8' ], }, + { + 'key' => 'disable_payauto_default', + 'section' => 'UI', + 'description' => 'Disable the "Charge future payments to this (card|check) automatically" checkbox from defaulting to checked.', + 'type' => 'checkbox', + }, + + { key => "apacheroot", section => "deprecated", description => "DEPRECATED", type => "text" }, { key => "apachemachine", section => "deprecated", description => "DEPRECATED", type => "text" }, { key => "apachemachines", section => "deprecated", description => "DEPRECATED", type => "text" }, diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index d12198211..e6600e689 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -112,6 +112,14 @@ % $text_disabled = 'style="color: #000000";' % } % +% my $disable_payauto = $conf->exists('disable_payauto_default'); +% my $CARD_payauto_checked = $payby eq 'DCRD' ? '' +% : $payby eq 'CARD' ? 'CHECKED' +% : $disable_payauto ? '' : 'CHECKED'; +% my $CHEK_payauto_checked = $payby eq 'DCHK' ? '' +% : $payby eq 'CHEK' ? 'CHECKED' +% : $disable_payauto ? '' : 'CHECKED'; +% % my %payby = ( % % 'CARD' => @@ -163,7 +171,7 @@ % qq!${r}Exact name on card !. % qq!!. % -% qq! Charge future payments to this card automatically'. +% qq! Charge future payments to this card automatically!. % % '', % @@ -201,7 +209,7 @@ % ). % % -% qq! Charge future payments to this electronic check automatically'. +% qq! Charge future payments to this electronic check automatically!. % % ' '. % ' '. -- 2.11.0