communigate provisioning phase 2: add svc_domain.trailer -> communigate TrailerText...
[freeside.git] / httemplate / view / svc_phone.cgi
index 2733e25..75591c7 100644 (file)
@@ -1,16 +1,10 @@
 <% include('elements/svc_Common.html',
               'table'     => 'svc_phone',
-              'fields'    => [qw(
-                                  countrycode
-                                  phonenum
-                                  pbx_title
-                                  sip_password
-                                  pin
-                                  phone_name
-                             )],
+              'fields'    => \@fields,
               'labels'    => {
                                'countrycode'  => 'Country code',
                                'phonenum'     => 'Phone number',
+                               'domain'       => 'Domain',
                                'pbx_title'    => 'PBX',
                                'sip_password' => 'SIP password',
                                'pin'          => 'PIN',
 %>
 <%init>
 
+my $conf = new FS::Conf;
+my $countrydefault = $conf->config('countrydefault') || 'US';
+
+my @fields = qw( countrycode phonenum );
+push @fields, 'domain' if $conf->exists('svc_phone-domain');
+push @fields, qw( pbx_title sip_password pin phone_name );
+
 my $html_foot = sub {
   my $svc_phone = shift;
 
   ###
+  # E911 Info
+  ###
+
+  my $e911 = 
+    'E911 Information'.
+    &ntable("#cccccc"). '<TR><TD>'. ntable("#cccccc",2).
+      '<TR><TD>Location</TD>'.
+      '<TD BGCOLOR="#FFFFFF">'.
+        $svc_phone->location_label( 'join_string'     => '<BR>',
+                                    'double_space'    => ' &nbsp; ',
+                                    'escape_function' => \&encode_entities,
+                                    'countrydefault'  => $countrydefault,
+                                  ).
+      '</TD></TR>'.
+    '</TABLE></TD></TR></TABLE>'.
+    '<BR>'
+  ;
+
+  ###
   # Devices
   ###
 
@@ -123,6 +143,7 @@ my $html_foot = sub {
   # concatenate & return
   ###
 
+  $e911.
   $devices.
   join(' | ', @links ). '<BR>'.
   join(' | ', @ilinks). '<BR>';