default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / edit / process / elements / device_Common.html
1 <& process.html,
2      'redirect' => sub {
3        my( $cgi, $X_device ) = @_;
4        popurl(3)."view/$svc_table.cgi?".
5          'svcnum='. $X_device->svcnum.
6          ';devicenum=';
7      },
8      %opt,
9 &>
10 <%init>
11
12 my %opt = @_;
13
14 warn my $table = $opt{table};
15 ( my $svc_table = $table ) =~ s/_device//;
16 $svc_table = "svc_$svc_table";
17
18 if($cgi->param('sel_mac_addr') && !$cgi->param('mac_addr')) {
19     $cgi->param('mac_addr',$cgi->param('sel_mac_addr'));
20 }
21
22 # :/  needs agent-virt so you can't futz with arbitrary devices
23
24 die "access denied"
25   unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
26
27 </%init>