X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fcancel_pkg.html;h=4b5df865414f8dffdb03bd6734a2c5637e741090;hb=781f0ffcf560d3df0aec7ae349b57463d1c2518a;hp=b6fe785226190f6e8d6994cd08438ada0c022ca9;hpb=f1802f4b19c6741b50007b56bbac13af61012fe5;p=freeside.git
diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html
index b6fe78522..4b5df8654 100755
--- a/httemplate/misc/cancel_pkg.html
+++ b/httemplate/misc/cancel_pkg.html
@@ -1,9 +1,4 @@
-<& /elements/header-popup.html, emt($title) &>
-
-
-
-
-
+<& /elements/header-popup.html, mt($title) &>
<& /elements/error.html &>
@@ -15,37 +10,47 @@
<% emt(ucfirst($method)." [_1]", $part_pkg->pkg_comment) %>
<% ntable("#cccccc", 2) %>
-% if ($method eq 'expire' || $method eq 'adjourn') {
-
-% $submit =~ /^(\w*)\s/;
- <% mt("$1 package on") |h %> |
-
-
- <% mt('m/d/y') |h %>
- |
-
-
-%}
-%
-
+% 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')",
+ 'field' => 'reasonnum',
+ 'reason_class' => $class,
+ 'curr_value' => $reasonnum,
+ 'control_button' => "document.getElementById('confirm_cancel_pkg_button')",
&>
-
+% }
+
+% if ( ( $method eq 'adjourn' or $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,
+} &>
+% }
-
+>