X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_Common.html;h=9c4d71eb8e9b4e2967846204ba826dc276970199;hb=9aa198dfc90054de34cf1af8f3238d004416ebc9;hp=7b46dc9c986feb8819e0c59b2c61743e5ebb72e8;hpb=6e3a9df538c2aecccebdd3903447eb62793465bb;p=freeside.git diff --git a/httemplate/view/svc_Common.html b/httemplate/view/svc_Common.html index 7b46dc9c9..9c4d71eb8 100644 --- a/httemplate/view/svc_Common.html +++ b/httemplate/view/svc_Common.html @@ -7,7 +7,7 @@ # false laziness w/edit/svc_Common.html -$cgi->param('svcdb') =~ /^(svc_\w+)$/ or die "unparsable svcdb"; +$cgi->param('svcdb') =~ /^(svc_\w+)$/ or die "unparseable svcdb"; my $table = $1; require "FS/$table.pm"; @@ -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 + ]; + }