X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_virtual_field.cgi;h=b18440036ff3882cd43728a8954973b989ef9e08;hp=a0009dabd12bf74f94e1ce07f2c87c2f36ccde18;hb=3f2a7b01b59902faed5767d81e2959e131bdbdfd;hpb=eb9668a6f3181ee02cb335272c5ee4616e61fd09 diff --git a/httemplate/browse/part_virtual_field.cgi b/httemplate/browse/part_virtual_field.cgi index a0009dabd..b18440036 100644 --- a/httemplate/browse/part_virtual_field.cgi +++ b/httemplate/browse/part_virtual_field.cgi @@ -1,39 +1,42 @@ -<%= header('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} }, $_; +} +