add (unfinished) credit card surcharge, part 1
[freeside.git] / httemplate / edit / phone_device.html
1 <% include( 'elements/edit.html',
2                  'name'   => 'Phone device',
3                  'table'  => 'phone_device',
4                  'labels' => { 
5                                'devicenum'  => 'Device',
6                                'devicepart' => 'Device type',
7                                'mac_addr'   => 'MAC address',
8                              },
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 => '' },
15                                },
16                                'mac_addr',
17                                { 'field' => 'svcnum',
18                                  'type'  => 'hidden',
19                                },
20                              ],
21                  'menubar' => [], #disable viewall
22                  #'viewall_dir' => 'browse',
23                  'new_callback' => sub {
24                                      my( $cgi, $object ) = @_;
25                                      $object->svcnum( $cgi->param('svcnum') );
26                                    },
27            )
28 %>
29 <%init>
30
31 # :/  needs agent-virt so you can't futz with arbitrary devices
32
33 die "access denied"
34   unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
35
36
37 </%init>