communigate provisioning phase 2: add svc_domain.trailer -> communigate TrailerText...
[freeside.git] / httemplate / view / svc_Common.html
1 <% include('elements/svc_Common.html',
2              'table'    => $table,
3              'edit_url' => $p."edit/svc_Common.html?svcdb=$table;svcnum=",
4              %opt,
5           )
6 %>
7 <%init>
8
9 # false laziness w/edit/svc_Common.html
10
11 $cgi->param('svcdb') =~ /^(svc_\w+)$/ or die "unparsable svcdb";
12 my $table = $1;
13 require "FS/$table.pm";
14
15 my %opt;
16 if ( UNIVERSAL::can("FS::$table", 'table_info') ) {
17   $opt{'name'}   = "FS::$table"->table_info->{'name'};
18
19   my $fields = "FS::$table"->table_info->{'fields'};
20   my %labels = map { $_ =>  ( ref($fields->{$_})
21                                ? $fields->{$_}{'label'}
22                                : $fields->{$_}
23                            );
24                    }
25                keys %$fields;
26   $opt{'labels'} = \%labels;
27 }
28
29 </%init>