diff options
| author | ivan <ivan> | 2011-04-12 02:51:50 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2011-04-12 02:51:50 +0000 | 
| commit | a2253aacd9b6c142236fb800f1c74b04510000f9 (patch) | |
| tree | eb580494a7e4b60ec15824f04496bb04b7e18233 | |
| parent | 5668de2e9beab1c2881dc697aaf9fa19a3be6f2b (diff) | |
add disable_payauto_default conf, RT#12431
| -rw-r--r-- | FS/FS/Conf.pm | 8 | ||||
| -rw-r--r-- | 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 => "<b>DEPRECATED</b>", type => "text" },    { key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },    { key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", 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!<TR><TD ALIGN="right" WIDTH="200">${r}Exact name on card </TD>!.  %          qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="CARD_payname" VALUE="!. ( $payby =~ /^(CARD|DCRD)$/ ? $cust_main->payname : '' ). qq!"></TD></TR>!.  % -%        qq!<TR><TD COLSPAN=2 WIDTH="608"><INPUT TYPE="checkbox" NAME="CARD_payauto" !. ( $payby eq 'DCRD' ? '' : 'CHECKED' ). '> Charge future payments to this card automatically</TD></TR>'. +%        qq!<TR><TD COLSPAN=2 WIDTH="608"><INPUT TYPE="checkbox" NAME="CARD_payauto" $CARD_payauto_checked> Charge future payments to this card automatically</TD></TR>!.  %  %      '</TABLE>',  % @@ -201,7 +209,7 @@  %       ).  %  % -%        qq!<TR><TD COLSPAN=4 WIDTH="608"><INPUT TYPE="checkbox" NAME="CHEK_payauto" !. ( $payby eq 'DCHK' ? '' : 'CHECKED' ). '> Charge future payments to this electronic check automatically</TD></TR>'. +%        qq!<TR><TD COLSPAN=4 WIDTH="608"><INPUT TYPE="checkbox" NAME="CHEK_payauto" $CHEK_payauto_checked> Charge future payments to this electronic check automatically</TD></TR>!.  %  %        '<TR><TD> </TD></TR>'.  %        '<TR><TD> </TD></TR>'.  | 
