-
- <P ALIGN="center"><B>Permanently delete all services and cancel this customer?</B>
-
- <% $ban %>
-
-<BR><BR>
-
-<% ntable("#cccccc", 2) %>
-
-<% include('/elements/tr-select-reason.html',
+ <P ALIGN="center"><B><% mt('Permanently delete all services and cancel this customer?') |h %></B>
+
+<TABLE BORDER="0" CELLSPACING="2" STYLE="margin-left:auto; margin-right:auto">
+<TR>
+ <TD ALIGN="right">
+ <INPUT TYPE="radio" NAME="now_or_later" VALUE="0" onclick="toggle(false)" CHECKED />
+ </TD>
+ <TD ALIGN="left"><% mt('Cancel now') |h %></TD>
+</TR>
+<TR>
+ <TD ALIGN="right">
+ <INPUT TYPE="radio" NAME="now_or_later" VALUE="1" onclick="toggle(true)" />
+ </TD>
+ <TD ALIGN="left"><% mt('Cancel on date: ') |h %>
+ <& /elements/input-date-field.html, {
+ 'name' => 'expire',
+ 'value' => time,
+ } &>
+ </TD>
+</TR>
+</TABLE>
+<SCRIPT type="text/javascript">
+function toggle(val) {
+ document.getElementById("expire_text").disabled = !val;
+ document.getElementById("ban").disabled = val;
+ document.getElementById("expire_button").style.visibility =
+ val ? 'visible' : 'hidden';
+}
+toggle(false);
+</SCRIPT>
+% if ( $cust_main->payby =~ /^(CARD|DCRD|CHEK|DCHK)$/ ) {
+% my $ban = "Ban this customer's ";
+% $ban .= 'credit card' if $cust_main->payby =~ /^(CARD|DCRD)$/;
+% $ban .= 'ACH account' if $cust_main->payby =~ /^(CHEK|DCHK)$/;
+ <P ALIGN="center">
+ <INPUT TYPE="checkbox" NAME="ban" ID="ban" VALUE="1"><% mt($ban) |h %>
+% }
+
+<TABLE BGCOLOR="#cccccc" BORDER="0" CELLSPACING="2" STYLE="margin-left:auto; margin-right:auto">
+<& /elements/tr-select-reason.html,