From ce98306f315a53f2ac4b8c010341c4f84bf728a8 Mon Sep 17 00:00:00 2001 From: jeff Date: Thu, 19 Oct 2006 14:29:27 +0000 Subject: suspension and cancellation reasons --- httemplate/misc/cancel_pkg.html | 95 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100755 httemplate/misc/cancel_pkg.html (limited to 'httemplate/misc/cancel_pkg.html') diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html new file mode 100755 index 000000000..bfb0893e9 --- /dev/null +++ b/httemplate/misc/cancel_pkg.html @@ -0,0 +1,95 @@ +%# if ( $link eq 'popup' ) { + <% include('/elements/header-popup.html', $title ) %> +%# } else { +%# <% include("/elements/header.html", $title, '') %> +%# } + + + + + + +% if ( $cgi->param('error') ) { + Error: <% $cgi->param('error') %> +

+% } + +
+ + + + +

+<% ucfirst($method) . " $pkgnum: " .$part_pkg->pkg. ' - ' .$part_pkg->comment %> +<% ntable("#cccccc", 2) %> + +% if ($method eq 'expire') { + + Cancel package on + + +
m/d/y + + + +%} +% + +<% include('/elements/tr-select-reason.html', 'reasonnum', $class) %> + + + +
+ + +
+ + + +<%init> +my($method, $pkgnum, $reasonnum, $submit, $cust_pkg, $part_pkg, + $date, $curuser, $class); +$date = time2str("%m/%d/%Y", time); +if ( $cgi->param('error') ) { + $method = $cgi->param('method'); + $pkgnum = $cgi->param('pkgnum'); + $reasonnum = $cgi->param('reasonnum'); + $date = $cgi->param('date'); +} elsif ( $cgi->param('pkgnum') =~ /^(\d+)$/ ) { + $pkgnum = $1; +} else { + die "illegal query ". $cgi->keywords; +} + +$method = $cgi->param('method'); +if ($method eq 'cancel') { + $class = 'C'; + $submit = "Cancel Now"; +}elsif ($method eq 'expire') { + $class = 'C'; + $submit = "Cancel Later"; +}elsif ($method eq 'suspend') { + $class = 'S'; + $submit = "Suspend"; +}else{ + die "illegal query ". $cgi->keywords; +} + +my $title = ucfirst($method) . ' Package'; + +$cust_pkg = qsearchs('cust_pkg', {'pkgnum' => $pkgnum}); +die "No such package: $pkgnum" unless $cust_pkg; + +$part_pkg = $cust_pkg->part_pkg; + +$curuser = $FS::CurrentUser::CurrentUser; + + + -- cgit v1.2.1 From 9811b8ce65909a293810ddbcd8c9b5ca963fba01 Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 23 Oct 2006 04:21:04 +0000 Subject: events should attach reasons --- httemplate/misc/cancel_pkg.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/misc/cancel_pkg.html') diff --git a/httemplate/misc/cancel_pkg.html b/httemplate/misc/cancel_pkg.html index bfb0893e9..e61000618 100755 --- a/httemplate/misc/cancel_pkg.html +++ b/httemplate/misc/cancel_pkg.html @@ -42,12 +42,12 @@ %} % -<% include('/elements/tr-select-reason.html', 'reasonnum', $class) %> +<% include('/elements/tr-select-reason.html', 'reasonnum', $class, '', '', '', 'document.sc_popup.submit' ) %>
- + -- cgit v1.2.1