1 <% include( 'elements/edit.html',
2 'name' => 'Phone device',
3 'table' => 'phone_device',
5 'devicenum' => 'Device',
6 'devicepart' => 'Device type',
7 'mac_addr' => 'MAC address',
9 'fields' => [ { 'field' => 'devicepart',
10 'type' => 'select-table',
11 'table' => 'part_device',
12 'name_col' => 'devicename',
13 'empty_label' =>'Select device type',
14 #'hashref' =>{ disabled => '' },
17 { 'field' => 'svcnum',
21 'menubar' => [], #disable viewall
22 #'viewall_dir' => 'browse',
23 'new_callback' => sub {
24 my( $cgi, $object ) = @_;
25 $object->svcnum( $cgi->param('svcnum') );
31 # :/ needs agent-virt so you can't futz with arbitrary devices
34 unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?