From 7360c297b80cd26e375149bb12393dc7e7674f1e Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 10 Sep 2013 01:42:31 -0700 Subject: [PATCH] svc_cable service have a single serial / MAC / model, not one-to-many devices like svc_phone and svc_dsl, RT#22009 --- httemplate/view/svc_Common.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/httemplate/view/svc_Common.html b/httemplate/view/svc_Common.html index 7e300b049..9c4d71eb8 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 + ]; + } -- 2.11.0