Mark Wells is now a member of the core team. Kristian Hoffman has been moved to...
[freeside.git] / httemplate / edit / svc_phone.cgi
index 78b849c..3c7b752 100644 (file)
@@ -1,11 +1,15 @@
 <% include( 'elements/svc_Common.html',
                'name'     => 'Phone number',
                'table'    => 'svc_phone',
-               'fields'   => [qw( countrycode phonenum )], #pin
+               'fields'   => \@fields,
                'labels'   => {
-                               'countrycode' => 'Country code',
-                               'phonenum'    => 'Phone number',
-                               'pin'         => 'PIN',
+                               'countrycode'  => 'Country code',
+                               'phonenum'     => 'Phone number',
+                               'domsvc'       => 'Domain',
+                               'sip_password' => 'SIP password',
+                               'pin'          => 'Voicemail PIN',
+                               'phone_name'   => 'Name',
+                               'pbxsvc'       => 'PBX',
                              },
            )
 %>
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
 
+my $conf = new FS::Conf;
+
+my @fields = ( 'countrycode',
+               { field => 'phonenum',
+                 type  => 'select-did',
+                 label => 'Phone number',
+               },
+             );
+
+push @fields, { field => 'domsvc',
+                type  => 'select-svc-domain',
+                label => 'Domain',
+              }
+  if $conf->exists('svc_phone-domain');
+
+push @fields, { field => 'pbxsvc',
+                type  => 'select-svc_pbx',
+                label => 'PBX',
+              },
+              'sip_password',
+              'pin',
+              'phone_name',
+;
+
 </%init>