summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorivan <ivan>2010-03-08 07:02:58 +0000
committerivan <ivan>2010-03-08 07:02:58 +0000
commit611624bc08f525d19e1bd548a7d005aa73a53145 (patch)
treef53bcfab25e8038ae485f707da619e37f46741a9 /httemplate/edit
parent919bcddcb7a1ec551d27faac925fedc7d9644f3c (diff)
domain names in netsapiens export (domain name association w/svc_phone), RT#5864
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/elements/svc_Common.html5
-rw-r--r--httemplate/edit/svc_phone.cgi39
2 files changed, 30 insertions, 14 deletions
diff --git a/httemplate/edit/elements/svc_Common.html b/httemplate/edit/elements/svc_Common.html
index 453d07f88..2e98a1b25 100644
--- a/httemplate/edit/elements/svc_Common.html
+++ b/httemplate/edit/elements/svc_Common.html
@@ -81,7 +81,10 @@
$f->{'disable_empty'} = $object->svcnum ? 1 : 0,
}
- if ( $f->{'type'} eq 'select-svc_pbx' ) {
+ if ( $f->{'type'} eq 'select-svc_pbx'
+ || $f->{'type'} eq 'select-svc-domain'
+ )
+ {
$f->{'include_opt_callback'} =
sub { ( 'pkgnum' => $pkgnum,
'svcpart' => $svcpart,
diff --git a/httemplate/edit/svc_phone.cgi b/httemplate/edit/svc_phone.cgi
index 55ee890f4..3c7b75249 100644
--- a/httemplate/edit/svc_phone.cgi
+++ b/httemplate/edit/svc_phone.cgi
@@ -1,22 +1,11 @@
<% include( 'elements/svc_Common.html',
'name' => 'Phone number',
'table' => 'svc_phone',
- 'fields' => [ 'countrycode',
- { field => 'phonenum',
- type => 'select-did',
- label => 'Phone number',
- },
- { field => 'pbxsvc',
- type => 'select-svc_pbx',
- label => 'PBX',
- },
- 'sip_password',
- 'pin',
- 'phone_name',
- ],
+ 'fields' => \@fields,
'labels' => {
'countrycode' => 'Country code',
'phonenum' => 'Phone number',
+ 'domsvc' => 'Domain',
'sip_password' => 'SIP password',
'pin' => 'Voicemail PIN',
'phone_name' => 'Name',
@@ -29,4 +18,28 @@
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>