summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/elements/device_Common.html
blob: 7b6f2cd789b8c65459bdd3001425f55d5c56231c (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
<& process.html,
     'redirect' => sub {
       my( $cgi, $X_device ) = @_;
       popurl(3)."view/$svc_table.cgi?".
         'svcnum='. $X_device->svcnum.
         ';devicenum=';
     },
     %opt,
&>
<%init>

my %opt = @_;

warn my $table = $opt{table};
( my $svc_table = $table ) =~ s/_device//;
$svc_table = "svc_$svc_table";

if($cgi->param('sel_mac_addr') && !$cgi->param('mac_addr')) {
    $cgi->param('mac_addr',$cgi->param('sel_mac_addr'));
}

# :/  needs agent-virt so you can't futz with arbitrary devices

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?

</%init>