summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-xhttemplate/misc/cancel_pkg.html9
-rwxr-xr-xhttemplate/misc/process/cancel_pkg.html9
2 files changed, 11 insertions, 7 deletions
diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html
index e61000618..b085d2281 100755
--- a/httemplate/misc/cancel_pkg.html
+++ b/httemplate/misc/cancel_pkg.html
@@ -23,9 +23,9 @@
<% ucfirst($method) . " $pkgnum: " .$part_pkg->pkg. ' - ' .$part_pkg->comment %>
<% ntable("#cccccc", 2) %>
-% if ($method eq 'expire') {
+% if ($method eq 'expire' || $method eq 'adjourn') {
<TR>
- <TD>Cancel package on </TD>
+ <TD><% $submit =~ /^(\w*)\s/ %> package on </TD>
<TD><INPUT TYPE="text" NAME="date" ID="expire_date" VALUE="<% $date %>">
<IMG SRC="<% $p %>images/calendar.png" ID="expire_button" STYLE="cursor:pointer" TITLE="Select date">
<BR><I>m/d/y</I>
@@ -77,7 +77,10 @@ if ($method eq 'cancel') {
$submit = "Cancel Later";
}elsif ($method eq 'suspend') {
$class = 'S';
- $submit = "Suspend";
+ $submit = "Suspend Now";
+}elsif ($method eq 'adjourn') {
+ $class = 'S';
+ $submit = "Suspend Later";
}else{
die "illegal query ". $cgi->keywords;
}
diff --git a/httemplate/misc/process/cancel_pkg.html b/httemplate/misc/process/cancel_pkg.html
index cd533be10..50b111093 100755
--- a/httemplate/misc/process/cancel_pkg.html
+++ b/httemplate/misc/process/cancel_pkg.html
@@ -1,7 +1,7 @@
<%init>
#untaint method
my $method = $cgi->param('method');
-$method =~ /^(cancel|expire|suspend)$/ || die "Illegal method";
+$method =~ /^(cancel|expire|suspend|adjourn)$/ || die "Illegal method";
$method = $1;
#untaint pkgnum
@@ -15,7 +15,7 @@ $reasonnum =~ /^(-?\d+)$/ || die "Illegal reasonnum";
$reasonnum = $1;
my $date = time;
-if ($method eq 'expire'){
+if ($method eq 'expire' || $method eq 'adjourn'){
#untaint date
$date = $cgi->param('date');
str2time($cgi->param('date')) =~ /^(\d+)$/ || die "Illegal date";
@@ -47,9 +47,9 @@ if ($reasonnum == -1) {
}
unless ($error) {
- if ($method eq 'expire'){
+ if ($method eq 'expire' || $method eq 'adjourn'){
my %hash = $cust_pkg->hash;
- $hash{'expire'}=$date;
+ $hash{$method}=$date;
my $new = new FS::cust_pkg (\%hash);
$error = $new->replace($cust_pkg, 'reason' => $reasonnum);
}else{
@@ -68,6 +68,7 @@ $dbh->commit or die $dbh->errstr if $oldAutoCommit;
my %past = ( 'cancel' => 'cancelled',
'expire' => 'expired',
'suspend' => 'suspended',
+ 'adjourn' => 'adjourned',
);
</%init>
<% header("Package $past{$method}") %>