X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Frate.cgi;h=5bfc108c1c2445bbb586166fb4e4a71677de7b97;hb=998b32d356338772484814a477d9efb159206b8d;hp=83a89c475209963067f6dec29163c8d0b84b43a1;hpb=f7fd2a3e34da751cbc02bbf215e99c6dc89adc15;p=freeside.git diff --git a/httemplate/edit/rate.cgi b/httemplate/edit/rate.cgi index 83a89c475..5bfc108c1 100644 --- a/httemplate/edit/rate.cgi +++ b/httemplate/edit/rate.cgi @@ -1,94 +1,87 @@ - -<% - -my $rate; -if ( $cgi->param('error') ) { - $rate = new FS::rate ( { - map { $_, scalar($cgi->param($_)) } fields('rate') - } ); -} elsif ( $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'; - -my $p1 = popurl(1); - -my %granularity = ( - '6' => '6 second', - '60' => 'minute', -); - -%> - -<%= header("$action Rate plan", menubar( - 'Main Menu' => $p, +<& /elements/header.html, + "$action Rate plan", + menubar( 'View all rate plans' => "${p}browse/rate.cgi", - )) + 'View packages that use this plan' => "${p}browse/part_pkg.cgi?ratenum=" + . $rate->ratenum, + ) +&> + +<% include('/elements/progress-init.html', + 'OneTrueForm', + [ 'rate', 'agentnum' ], + 'process/rate.cgi', + $p.'browse/rate.cgi', + ) %> +
+ +% if($rate->ratenum) { +