diff options
| author | ivan <ivan> | 2008-01-13 21:36:09 +0000 |
|---|---|---|
| committer | ivan <ivan> | 2008-01-13 21:36:09 +0000 |
| commit | 2bee469e81f4963d83b9bf020c817dcb436a6a80 (patch) | |
| tree | d3509afb4a827279a50241a7f065e0d3481052f8 /httemplate/edit/part_bill_event.cgi | |
| parent | 97e6cec67c0c99ce1b6f0667a09f1e009100189d (diff) | |
ACLs
Diffstat (limited to 'httemplate/edit/part_bill_event.cgi')
| -rwxr-xr-x | httemplate/edit/part_bill_event.cgi | 69 |
1 files changed, 33 insertions, 36 deletions
diff --git a/httemplate/edit/part_bill_event.cgi b/httemplate/edit/part_bill_event.cgi index 4997d0596..d8c5b44ba 100755 --- a/httemplate/edit/part_bill_event.cgi +++ b/httemplate/edit/part_bill_event.cgi @@ -1,40 +1,6 @@ -<!--mason kludge--> -% -% -%if ( $cgi->param('eventpart') && $cgi->param('eventpart') =~ /^(\d+)$/ ) { -% $cgi->param('eventpart', $1); -%} else { -% $cgi->param('eventpart', ''); -%} -% -%my ($creason, $newcreasonT, $newcreason); -%my ($sreason, $newsreasonT, $newsreason); -% -% -%my ($query) = $cgi->keywords; -%my $action = ''; -%my $part_bill_event = ''; -%my $currentreasonclass = ''; -%if ( $cgi->param('error') ) { -% $part_bill_event = new FS::part_bill_event ( { -% map { $_, scalar($cgi->param($_)) } fields('part_bill_event') -% } ); -%} -%if ( $query && $query =~ /^(\d+)$/ ) { -% $part_bill_event ||= qsearchs('part_bill_event',{'eventpart'=>$1}); -%} else { -% $part_bill_event ||= new FS::part_bill_event {}; -%} -%$action ||= $part_bill_event->eventpart ? 'Edit' : 'Add'; -%my $hashref = $part_bill_event->hashref; -% -% - - <% include('/elements/header.html', "$action Invoice Event Definition", menubar( - 'Main Menu' => popurl(2), 'View all invoice events' => popurl(2). 'browse/part_bill_event.cgi', ) ) @@ -522,7 +488,38 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> </FORM> - </BODY> -</HTML> +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +if ( $cgi->param('eventpart') && $cgi->param('eventpart') =~ /^(\d+)$/ ) { + $cgi->param('eventpart', $1); +} else { + $cgi->param('eventpart', ''); +} + +my ($creason, $newcreasonT, $newcreason); +my ($sreason, $newsreasonT, $newsreason); + +my ($query) = $cgi->keywords; +my $action = ''; +my $part_bill_event = ''; +my $currentreasonclass = ''; +if ( $cgi->param('error') ) { + $part_bill_event = new FS::part_bill_event ( { + map { $_, scalar($cgi->param($_)) } fields('part_bill_event') + } ); +} +if ( $query && $query =~ /^(\d+)$/ ) { + $part_bill_event ||= qsearchs('part_bill_event',{'eventpart'=>$1}); +} else { + $part_bill_event ||= new FS::part_bill_event {}; +} +$action ||= $part_bill_event->eventpart ? 'Edit' : 'Add'; +my $hashref = $part_bill_event->hashref; +</%init> |
