summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-09-10 01:42:32 -0700
committerIvan Kohler <ivan@freeside.biz>2013-09-26 17:45:26 -0700
commite6c35a697d46eb5b47c5398daaf15d04f7c9022f (patch)
tree443549b43f051467a6aeea3c8cef8711ed912140
parent9113d56728b4e55606daa6316066c469b08a9fc7 (diff)
svc_cable service have a single serial / MAC / model, not one-to-many devices like svc_phone and svc_dsl, RT#22009
-rw-r--r--httemplate/view/svc_Common.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/httemplate/view/svc_Common.html b/httemplate/view/svc_Common.html
index 7b46dc9c9..4076987a2 100644
--- a/httemplate/view/svc_Common.html
+++ b/httemplate/view/svc_Common.html
@@ -25,6 +25,17 @@ if ( UNIVERSAL::can("FS::$table", 'table_info') ) {
}
keys %$fields;
$opt{'labels'} = \%labels;
+
+ #transform FS::svc_* table_info's structure into one svc_Common.html likes
+ delete $fields->{svcnum};
+ $opt{'fields'} = [ map { ref $fields->{$_}
+ ? { field => $_,
+ %{ $fields->{$_} }
+ }
+ : $_
+ } keys %$fields
+ ];
+
}
</%init>