default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / misc / bulk_suspend_pkg.cgi
1 <% include('/elements/header-popup.html', "Suspend Packages") %>
2
3 % if ( $cgi->param('error') ) {
4   <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
5   <BR><BR>
6 % }
7
8 <FORM ACTION="<% $p %>misc/process/bulk_suspend_pkg.cgi" METHOD=POST>
9
10 <& /elements/cust_pkg-search-form_input.html, $cgi &>
11
12 <% ntable('#cccccc') %>
13
14 % my $date_init = 0;
15   <& /elements/tr-input-date-field.html, {
16       'name'    => 'suspend_date',
17       'value'   => $date,
18       'label'   => mt("Suspend package on"),
19       'format'  => $date_format,
20   } &>
21 %   $date_init = 1;
22
23   <& /elements/tr-select-reason.html,
24        field          => 'suspend_reasonnum',
25        reason_class   => 'S',
26   &>
27
28 % if ( $FS::CurrentUser::CurrentUser->access_right('Unsuspend customer package')) {
29
30   <& /elements/tr-input-date-field.html, {
31       'name'    => 'suspend_resume_date',
32       'value'   => '',
33       'label'   => mt('Unsuspend on'),
34       'format'  => $date_format,
35       'noinit'  => $date_init,
36   } &>
37 % }
38
39 </TABLE>
40
41 <BR>
42 <INPUT TYPE="submit" VALUE="Suspend Packages">
43
44 </FORM>
45 </BODY>
46 </HTML>
47
48 <%init>
49
50 die "access denied"
51   unless $FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages');
52
53 #use Date::Parse qw(str2time);
54 #<table style="background-color: #cccccc; border-spacing: 2; width: 100%">
55
56 my $conf = new FS::Conf;
57 my $date_format = $conf->config('date_format') || '%m/%d/%Y';
58
59 my $date = time;
60
61 </%init>