diff options
Diffstat (limited to 'httemplate/edit')
| -rw-r--r-- | httemplate/edit/dsl_device.html | 31 | ||||
| -rw-r--r-- | httemplate/edit/process/dsl_device.html | 22 | 
2 files changed, 53 insertions, 0 deletions
diff --git a/httemplate/edit/dsl_device.html b/httemplate/edit/dsl_device.html new file mode 100644 index 000000000..0d20fe522 --- /dev/null +++ b/httemplate/edit/dsl_device.html @@ -0,0 +1,31 @@ +<% include( 'elements/edit.html', +                 'name'   => 'DSL device', +                 'table'  => 'dsl_device', +                 'labels' => {  +                               'devicenum'  => 'Device', +                               'mac_addr'   => 'MAC address', +                             }, +                 'fields' => [ { field => 'mac_addr', +			         type => 'select-mac', +			       }, +                               { 'field' => 'svcnum', +                                 'type'  => 'hidden', +                               }, +                             ], +                 'menubar' => [], #disable viewall +                 #'viewall_dir' => 'browse', +                 'new_callback' => sub { +                                     my( $cgi, $object ) = @_; +                                     $object->svcnum( $cgi->param('svcnum') ); +                                   }, +           ) +%> +<%init> + +# :/  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> diff --git a/httemplate/edit/process/dsl_device.html b/httemplate/edit/process/dsl_device.html new file mode 100644 index 000000000..4dd53d444 --- /dev/null +++ b/httemplate/edit/process/dsl_device.html @@ -0,0 +1,22 @@ +<% include( 'elements/process.html', +               'table'    => 'dsl_device', +               'redirect' => sub { +                 my( $cgi, $dsl_device ) = @_; +                 popurl(3).'view/svc_dsl.cgi?'. +                   'svcnum='. $dsl_device->svcnum. +                   ';devicenum='; +               }, +           ) +%> +<%init> + +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>  | 
