1 %# if ( $link eq 'popup' ) {
2 <% include('/elements/header-popup.html', $title ) %>
4 %# <% include("/elements/header.html", $title, '') %>
7 <% include('/elements/init_calendar.html') %>
9 <% include('/elements/error.html') %>
11 <FORM NAME="ds_popup" ACTION="<% popurl(1) %>process/delay_susp_pkg.html" METHOD=POST>
12 <INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
15 <% "Delay automatic suspension of ".
16 $part_pkg->pkg_comment( cust_pkg=>$cust_pkg )
18 <% ntable("#cccccc", 2) %>
22 <TD><INPUT TYPE="text" NAME="date" ID="dun_date" VALUE="<% $date |h %>">
23 <IMG SRC="<% $p %>images/calendar.png" ID="dun_button" STYLE="cursor:pointer" TITLE="Select date">
27 <SCRIPT TYPE="text/javascript">
29 inputField: "dun_date",
30 ifFormat: "<% $date_format %>",
39 <INPUT TYPE="submit" NAME="submit" VALUE="<% $submit %>">
47 my $conf = new FS::Conf;
48 my $date_format = $conf->config('date_format') || '%m/%d/%Y';
50 my $date = time2str($date_format, time);
53 if ( $cgi->param('error') ) {
54 $pkgnum = $cgi->param('pkgnum');
55 $date = $cgi->param('date');
56 } elsif ( $cgi->param('pkgnum') =~ /^(\d+)$/ ) {
59 die "illegal query ". $cgi->keywords;
62 my $submit = 'Delay Suspension';
63 my $right = 'Delay suspension events';
65 my $curuser = $FS::CurrentUser::CurrentUser;
66 die "access denied" unless $curuser->access_right($right);
68 my $title = 'Delay Suspension of Package';
70 my $cust_pkg = qsearchs('cust_pkg', {'pkgnum' => $pkgnum})
71 or die "Unknown pkgnum: $pkgnum";
73 $date = time2str($date_format, $cust_pkg->dundate)
75 && ! $cgi->param('error');
77 my $part_pkg = $cust_pkg->part_pkg;