-<% include("/elements/header.html","$action Package Definition", menubar(
- 'Main Menu' => popurl(2),
+<% include('/elements/header.html', "$action Package Definition", menubar(
'View all packages' => popurl(2). 'browse/part_pkg.cgi',
)) %>
% #), ' onLoad="visualize()"');
% delete $freq{$_} foreach grep { ! /^\d+$/ } keys %freq;
%}
%
+%#this should be replaced by /elements/selectlayers.html
%my $widget = new HTML::Widgets::SelectLayers(
% 'selected_layer' => $part_pkg->plan,
% 'options' => \%options,
<BR><BR>Price plan <% $widget->html %>
- </BODY>
-</HTML>
+
+<% include('/elements/footer.html') %>
<%init>
if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {
$cgi->param('pkgnum', '');
}
+my $curuser = $FS::CurrentUser::CurrentUser;
+
+die "access denied"
+ unless $curuser->access_right('Edit package definitions')
+ || $curuser->access_right('Edit global package definitions')
+ || ( $cgi->param('pkgnum') && $curuser->access_right('Customize customer package') );
+
my ($query) = $cgi->keywords;
my $conf = new FS::Conf;