diff options
author | ivan <ivan> | 2008-01-13 21:35:54 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-01-13 21:35:54 +0000 |
commit | 0930d22ffc440f80c1b222b2e750cadbabd9e8f6 (patch) | |
tree | 59d6738ed4c685cd9bec804e9d3f661f4f37d72c /httemplate/edit/part_svc.cgi | |
parent | f49f11d4c3c4ba9480cc5c9acfaa606a5ba73ad1 (diff) |
ACLs
Diffstat (limited to 'httemplate/edit/part_svc.cgi')
-rwxr-xr-x | httemplate/edit/part_svc.cgi | 71 |
1 files changed, 38 insertions, 33 deletions
diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi index 9432839e7..4b8a24080 100755 --- a/httemplate/edit/part_svc.cgi +++ b/httemplate/edit/part_svc.cgi @@ -1,34 +1,7 @@ -% -%my $part_svc; -%my $clone = ''; -%if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {#clone -% #$cgi->param('clone') =~ /^(\d+)$/ or die "malformed query: $query"; -% $part_svc = qsearchs('part_svc', { 'svcpart'=>$1 } ) -% or die "unknown svcpart: $1"; -% $clone = $part_svc->svcpart; -% $part_svc->svcpart(''); -%} elsif ( $cgi->keywords ) { #edit -% my($query) = $cgi->keywords; -% $query =~ /^(\d+)$/ or die "malformed query: $query"; -% $part_svc=qsearchs('part_svc', { 'svcpart'=>$1 } ) -% or die "unknown svcpart: $1"; -%} else { #adding -% $part_svc = new FS::part_svc {}; -%} -% -%my $action = $part_svc->svcpart ? 'Edit' : 'Add'; -%my $hashref = $part_svc->hashref; -%# my $p_svcdb = $part_svc->svcdb || 'svc_acct'; -% -% -% #" onLoad=\"visualize()\"" -% - -<% include("/elements/header.html","$action Service Definition", - menubar( 'Main Menu' => $p, - 'View all service definitions' => "${p}browse/part_svc.cgi" - ), - ) +<% include('/elements/header.html', "$action Service Definition", + menubar('View all service definitions' => "${p}browse/part_svc.cgi"), + #" onLoad=\"visualize()\"" + ) %> <FORM NAME="dummy"> @@ -350,6 +323,38 @@ that field. % Table <% $widget->html %> - </BODY> -</HTML> + +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $part_svc; +my $clone = ''; +if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {#clone + #$cgi->param('clone') =~ /^(\d+)$/ or die "malformed query: $query"; + $part_svc = qsearchs('part_svc', { 'svcpart'=>$1 } ) + or die "unknown svcpart: $1"; + $clone = $part_svc->svcpart; + $part_svc->svcpart(''); +} elsif ( $cgi->keywords ) { #edit + my($query) = $cgi->keywords; + $query =~ /^(\d+)$/ or die "malformed query: $query"; + $part_svc=qsearchs('part_svc', { 'svcpart'=>$1 } ) + or die "unknown svcpart: $1"; +} else { #adding + $part_svc = new FS::part_svc {}; +} + +my $action = $part_svc->svcpart ? 'Edit' : 'Add'; +my $hashref = $part_svc->hashref; +# my $p_svcdb = $part_svc->svcdb || 'svc_acct'; + + + +</%init> + + |