X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_Common.html;h=9c4d71eb8e9b4e2967846204ba826dc276970199;hp=7b46dc9c986feb8819e0c59b2c61743e5ebb72e8;hb=11bbf29de447fe39e9d7155fe280a0df70fa8c3c;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924 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 + ]; + }