domain names in netsapiens export (domain name association w/svc_phone), RT#5864
[freeside.git] / httemplate / edit / svc_phone.cgi
1 <% include( 'elements/svc_Common.html',
2                'name'     => 'Phone number',
3                'table'    => 'svc_phone',
4                'fields'   => \@fields,
5                'labels'   => {
6                                'countrycode'  => 'Country code',
7                                'phonenum'     => 'Phone number',
8                                'domsvc'       => 'Domain',
9                                'sip_password' => 'SIP password',
10                                'pin'          => 'Voicemail PIN',
11                                'phone_name'   => 'Name',
12                                'pbxsvc'       => 'PBX',
13                              },
14            )
15 %>
16 <%init>
17
18 die "access denied"
19   unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
20
21 my $conf = new FS::Conf;
22
23 my @fields = ( 'countrycode',
24                { field => 'phonenum',
25                  type  => 'select-did',
26                  label => 'Phone number',
27                },
28              );
29
30 push @fields, { field => 'domsvc',
31                 type  => 'select-svc-domain',
32                 label => 'Domain',
33               }
34   if $conf->exists('svc_phone-domain');
35
36 push @fields, { field => 'pbxsvc',
37                 type  => 'select-svc_pbx',
38                 label => 'PBX',
39               },
40               'sip_password',
41               'pin',
42               'phone_name',
43 ;
44
45 </%init>