X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_virtual_field.cgi;h=b18440036ff3882cd43728a8954973b989ef9e08;hb=0bca43616911f2b48d9a0617e70a3bf0f30b92db;hp=5557988182a5b969c6ccae24a1ed100b2f4f918d;hpb=c1bb4ddb71147d0571bd301a6d8c452fdf0e1bc9;p=freeside.git diff --git a/httemplate/browse/part_virtual_field.cgi b/httemplate/browse/part_virtual_field.cgi index 555798818..b18440036 100644 --- a/httemplate/browse/part_virtual_field.cgi +++ b/httemplate/browse/part_virtual_field.cgi @@ -1,39 +1,42 @@ -<%= include("/elements/header.html",'Virtual field definitions', menubar('Main Menu' => $p)) %> -<% +<% include('/elements/header.html', 'Virtual field definitions') %> -my %pvfs; -my $block; -my $p2 = popurl(2); -my $dbtable; - -foreach (qsearch('part_virtual_field', {})) { - push @{ $pvfs{$_->dbtable} }, $_; -} -%> - -<% if ($cgi->param('error')) { %> - Error: <%=$cgi->param('error')%> -

-<% } %> +<% include('/elements/error.html') %> -Add a new field

+Add a new field

+% foreach $dbtable (sort { $a cmp $b } keys (%pvfs)) { -<% foreach $dbtable (sort { $a cmp $b } keys (%pvfs)) { %> -

<%=$dbtable%>

+

<%$dbtable%>

-<%=table()%> +<%table()%> Field nameDescription -<% foreach my $pvf (sort {$a->name cmp $b->name} @{ $pvfs{$dbtable} }) { %> +% foreach my $pvf (sort {$a->name cmp $b->name} @{ $pvfs{$dbtable} }) { + - - <%=$pvf->name%> - <%=$pvf->label%> + + <%$pvf->name%> + <%$pvf->label%> -<% } %> +% } + -<% } %> - - +% } + +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my %pvfs; +my $block; +my $p2 = popurl(2); +my $dbtable; + +foreach (qsearch('part_virtual_field', {})) { + push @{ $pvfs{$_->dbtable} }, $_; +} +