-% if ($method eq 'expire' || $method eq 'adjourn') {
-<TR>
- <TD><% $submit =~ /^(\w*)\s/ %> package on </TD>
- <TD><INPUT TYPE="text" NAME="date" ID="expire_date" VALUE="<% $date |h %>">
- <IMG SRC="<% $p %>images/calendar.png" ID="expire_button" STYLE="cursor:pointer" TITLE="Select date">
- <BR><I>m/d/y</I>
- </TD>
-</TR>
-<SCRIPT TYPE="text/javascript">
- Calendar.setup({
- inputField: "expire_date",
- ifFormat: "%m/%d/%Y",
- button: "expire_button",
- align: "BR"
- });
-</SCRIPT>
-%}
-%
-
-<% include('/elements/tr-select-reason.html',
- 'field' => 'reasonnum',
- 'reason_class' => $class,
- 'curr_value' => $reasonnum,
- 'control_button' => 'document.sc_popup.submit',
- )
-%>
-
+% my $date_init = 0;
+% if ($method eq 'expire' || $method eq 'adjourn' || $method eq 'resume') {
+% $submit =~ /^(\w*)\s/;
+<& /elements/tr-input-date-field.html, {
+ 'name' => 'date',
+ 'value' => $date,
+ 'label' => mt("$1 package on"),
+ 'format' => $date_format,
+} &>
+% $date_init = 1;
+% }
+
+% unless ( $method eq 'resume' ) { #the only one that doesn't need a reason
+<& /elements/tr-select-reason.html,
+ 'field' => 'reasonnum',
+ 'reason_class' => $class,
+ 'curr_value' => $reasonnum,
+ 'control_button' => "document.getElementById('confirm_cancel_pkg_button')",
+&>
+% }
+
+% if ( $method eq 'adjourn' || $method eq 'suspend' ) {
+ <TR><TD COLSPAN=2>
+% if ( $part_pkg->option('suspend_bill', 1) ) {
+ <& /elements/checkbox.html, name=>'no_suspend_bill', value=>'Y' &>
+ Disable recurring billing while suspended
+% } else {
+ <& /elements/checkbox.html, name=>'suspend_bill', value=>'Y' &>
+ Continue recurring billing while suspended
+% }
+ </TD></TR>
+% }
+
+% if ( ( $method eq 'adjourn' || $method eq 'suspend' ) and
+% $curuser->access_right('Unsuspend customer package') ) { #later?
+% my $resume_date = $cgi->param('error')
+% ? str2time($cgi->param('resume_date'))
+% : $cust_pkg->get('resume');
+
+<& /elements/tr-input-date-field.html, {
+ 'name' => 'resume_date',
+ 'value' => $resume_date,
+ 'label' => mt('Unsuspend on'),
+ 'format' => $date_format,
+ 'noinit' => $date_init,
+} &>
+% }