summaryrefslogtreecommitdiff
path: root/httemplate/edit/svc_hardware.cgi
blob: d9cd4cd66fabec23b9cf9081f7f707611f974d9c (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<% include( 'elements/svc_Common.html',
            'table'   	=> 'svc_hardware',
            'html_foot' => $html_foot,
            'fields'    => \@fields,
    )
%>
<%init>

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

my $conf = new FS::Conf;
my $date_format = $conf->config('date_format') || '%m/%d/%Y';

my $html_foot = sub { };

my @fields = (
  {
    field => 'typenum',
    type  => 'select-hardware_type',
  },
  {
    field => 'serial',
    type  => 'text',
    label => 'Device serial #',
  },
  {
    field => 'hw_addr',
    type  => $conf->exists('svc_hardware-check_mac_addr') ? 
              'input-mac_addr' : 'text',
    label => 'Hardware address',
  },
  {
    field => 'ip_addr',
    type  => 'text',
    label => 'IP address',
  },
  {
    field => 'smartcard',
    type  => 'text',
    label => 'Smartcard #',
  },
  {
    field => 'statusnum',
    type  => 'select-table',
    table => 'hardware_status',
    label => 'Service status',
    name_col => 'label',
    disable_empty => 1,
    hashref => { 'disabled' => '' },
  },
  {
    field => 'note',
    type  => 'textarea',
    rows  => 8,
    cols  => 50,
    label => 'Installation notes',
  },

);
    
</%init>