blob: 02f8824b46a4a1b7c275190bcc245795e808b4d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
%# if ( $link eq 'popup' ) {
<% include('/elements/header-popup.html', $title ) %>
%# } else {
%# <% include("/elements/header.html", $title, '') %>
%# }
<% include('/elements/init_calendar.html') %>
<% include('/elements/error.html') %>
<FORM NAME="ds_popup" ACTION="<% popurl(1) %>process/delay_susp_pkg.html" METHOD=POST>
<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
<BR><BR>
<% "Delay automatic suspension of ".
$part_pkg->pkg_comment( cust_pkg=>$cust_pkg )
%>
<% ntable("#cccccc", 2) %>
<TR>
<TD>Delay until</TD>
<TD><INPUT TYPE="text" NAME="date" ID="dun_date" VALUE="<% $date |h %>">
<IMG SRC="<% $p %>images/calendar.png" ID="dun_button" STYLE="cursor:pointer" TITLE="Select date">
<BR><I>m/d/y</I>
</TD>
</TR>
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "dun_date",
ifFormat: "<% $date_format %>",
button: "dun_button",
align: "BR"
});
</SCRIPT>
</TABLE>
<BR>
<INPUT TYPE="submit" NAME="submit" VALUE="<% $submit %>">
</FORM>
</BODY>
</HTML>
<%init>
my $conf = new FS::Conf;
my $date_format = $conf->config('date_format') || '%m/%d/%Y';
my $date = time2str($date_format, time);
my($pkgnum);
if ( $cgi->param('error') ) {
$pkgnum = $cgi->param('pkgnum');
$date = $cgi->param('date');
} elsif ( $cgi->param('pkgnum') =~ /^(\d+)$/ ) {
$pkgnum = $1;
} else {
die "illegal query ". $cgi->keywords;
}
my $submit = 'Delay Suspension';
my $right = 'Delay suspension events';
my $curuser = $FS::CurrentUser::CurrentUser;
die "access denied" unless $curuser->access_right($right);
my $title = 'Delay Suspension of Package';
my $cust_pkg = qsearchs('cust_pkg', {'pkgnum' => $pkgnum})
or die "Unknown pkgnum: $pkgnum";
$date = time2str($date_format, $cust_pkg->dundate)
if $cust_pkg->dundate
&& ! $cgi->param('error');
my $part_pkg = $cust_pkg->part_pkg;
</%init>
|