% include("/elements/header.html","$action Rate plan", menubar( 'View all rate plans' => "${p}browse/rate.cgi", )) %> <% include('/elements/progress-init.html', 'OneTrueForm', [ 'rate', 'min_', 'sec_' ], 'process/rate.cgi', $p.'browse/rate.cgi', ) %>
<% include('/elements/footer.html') %> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); my $rate; if ( $cgi->keywords ) { my($query) = $cgi->keywords; $query =~ /^(\d+)$/; $rate = qsearchs( 'rate', { 'ratenum' => $1 } ); } else { #adding $rate = new FS::rate {}; } my $action = $rate->ratenum ? 'Edit' : 'Add'; %init>