X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Frate.cgi;h=75c7143223ea8ca05d13984335017cfcfccbd182;hb=b4f0a47a6893de5f6b11f32307a0195f43a359fb;hp=4a02940333119d1e83ca70ed1f6614a6ac7b7675;hpb=3bc7d019313160a918a55cca6ab530f58db3673d;p=freeside.git diff --git a/httemplate/edit/rate.cgi b/httemplate/edit/rate.cgi index 4a0294033..75c714322 100644 --- a/httemplate/edit/rate.cgi +++ b/httemplate/edit/rate.cgi @@ -1,133 +1,45 @@ -<% - -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'; - -my $p1 = popurl(1); - -my %granularity = ( - '6' => '6 second', - '60' => 'minute', -); - -my $nous = < - -<%= header("$action Rate plan", menubar( - 'Main Menu' => $p, +<% include("/elements/header.html","$action Rate plan", menubar( 'View all rate plans' => "${p}browse/rate.cgi", )) %> - - - - - +<% include('/elements/progress-init.html', + 'OneTrueForm', + [ 'rate', 'preserve_rate_detail' ], # 'rate', 'min_', 'sec_' ], + 'process/rate.cgi', + $p.'browse/rate.cgi', + ) +%>
- + Rate plan - +

-<%= table() %> - - Region - Prefix(es) - Included
minutes
- Charge per
minute
- Granularity - + -<% foreach my $rate_region ( - qsearch( 'rate_region', - {}, - '', - "$nous ORDER BY regionname", - ) - ) { - my $n = $rate_region->regionnum; - my $rate_detail = - $rate->dest_detail($rate_region) - || new FS::rate_detail { 'min_included' => 0, - 'min_charge' => 0, - 'sec_granularity' => '60' - }; -%> - - <%= $rate_region->regionname %> - <%= $rate_region->prefixes_short %> - min_included %>"> - $min_charge ) %>"> - - - -<% } %> +" onClick="document.OneTrueForm.submit.disabled=true; process();"> - - - Add a region - - +
- +<% include('/elements/footer.html') %> -
" onClick="document.OneTrueForm.submit.disabled=true; process();"> -Please make sure to allow popups from this site in order to view the progress window. - +<%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'; +