svc_cable (2.3 backport), RT#22009
[freeside.git] / httemplate / view / elements / svc_Common.html
index 38fa90e..e5cf9f6 100644 (file)
@@ -52,7 +52,7 @@ function areyousure(href) {
 
 <% mt('Service #') |h %><B><% $svcnum %></B>
 % my $url = $opt{'edit_url'} || $p. 'edit/'. $opt{'table'}. '.cgi?';
-<& /view/elements/svc_edit_link.html, 'svc' => $svc_x &>
+<& /view/elements/svc_edit_link.html, 'svc' => $svc_x &>
 <BR>
 
 <% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
@@ -63,11 +63,13 @@ function areyousure(href) {
 %   if ( ref($f) ) {
 %     $field = $f->{'field'};
 %     $hack_strict_refs = \&{ $f->{'value'} } if $f->{'value'};
-%     $value = $f->{'value'} ? &$hack_strict_refs($svc_x) : $svc_x->$field;
+%     $value = $f->{'value'}
+%                ? &$hack_strict_refs($svc_x)
+%                : encode_entities($svc_x->$field);
 %     $type  = $f->{'type'} || 'text';
 %   } else {
 %     $field = $f;
-%     $value = $svc_x->$field;
+%     $value = encode_entities($svc_x->$field);
 %     $type = 'text';
 %   }
 %
@@ -104,6 +106,11 @@ function areyousure(href) {
 
 <BR>
 
+<& svc_devices.html,
+     'svc_x' => $svc_x,
+     'table' => $svc_x->device_table,
+&>
+
 % if ( defined($opt{'html_foot'}) ) {
 
   <% ref($opt{'html_foot'})
@@ -159,13 +166,13 @@ my($label, $value, $svcdb) = $cust_svc->label;
 
 my $part_svc = $cust_svc->part_svc;
 
-  #false laziness w/edit/svc_Common.html
-  #override default labels with service-definition labels if applicable
-  my $labels = $opt{labels}; #not -> here
-  foreach my $field ( keys %$labels ) {
-    my $col = $part_svc->part_svc_column($field);
-    $labels->{$field} = $col->columnlabel if $col->columnlabel !~ /^\S*$/;
-  }
+#false laziness w/edit/svc_Common.html
+#override default labels with service-definition labels if applicable
+my $labels = $opt{labels}; #not -> here
+foreach my $field ( keys %$labels ) {
+  my $col = $part_svc->part_svc_column($field);
+  $labels->{$field} = $col->columnlabel if $col->columnlabel !~ /^\s*$/;
+}
 
 my $pkgnum = $cust_svc->pkgnum;