1 <% include("/elements/header.html","$action Rate plan", menubar(
2 'View all rate plans' => "${p}browse/rate.cgi",
6 <% include('/elements/progress-init.html',
8 [ 'rate', 'preserve_rate_detail' ], # 'rate', 'min_', 'sec_' ],
13 <FORM NAME="OneTrueForm">
14 <INPUT TYPE="hidden" NAME="ratenum" VALUE="<% $rate->ratenum %>">
17 <INPUT TYPE="text" NAME="ratename" SIZE=32 VALUE="<% $rate->ratename %>">
20 <INPUT TYPE="hidden" NAME="preserve_rate_detail" VALUE="1">
22 <INPUT NAME="submit" TYPE="button" VALUE="<%
23 $rate->ratenum ? "Apply changes" : "Add rate plan"
24 %>" onClick="document.OneTrueForm.submit.disabled=true; process();">
27 % if($rate->ratenum) {
28 <BR><BR><FONT SIZE="+2">Rates in this plan</FONT>
29 <% include('/edit/elements/rate_detail.html',
30 'ratenum' => $rate->ratenum
34 <% include('/elements/footer.html') %>
39 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
42 if ( $cgi->keywords ) {
43 my($query) = $cgi->keywords;
45 $rate = qsearchs( 'rate', { 'ratenum' => $1 } );
47 $rate = new FS::rate {};
49 my $action = $rate->ratenum ? 'Edit' : 'Add';