summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/elements/device_Common.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/process/elements/device_Common.html')
-rw-r--r--httemplate/edit/process/elements/device_Common.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/httemplate/edit/process/elements/device_Common.html b/httemplate/edit/process/elements/device_Common.html
new file mode 100644
index 000000000..7b6f2cd78
--- /dev/null
+++ b/httemplate/edit/process/elements/device_Common.html
@@ -0,0 +1,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>