X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Frate_detail.html;h=23bc23ff89cbddf55aeb4c0cd427173e39cc4bd0;hb=52b311cb03ee6714c2ea8d108efdfef86c2c3e1d;hp=5dde85f8b59d537dcbc970c6bb5768b5c6629fd8;hpb=8baad1bb7327eb2f704bdcc5d040a24a94de8879;p=freeside.git
diff --git a/httemplate/browse/rate_detail.html b/httemplate/browse/rate_detail.html
index 5dde85f8b..23bc23ff8 100644
--- a/httemplate/browse/rate_detail.html
+++ b/httemplate/browse/rate_detail.html
@@ -17,6 +17,7 @@
'Included
minutes',
'Charge per
minute',
'Granularity',
+ 'Usage class',
],
'fields' => [
'regionname',
@@ -28,31 +29,20 @@
' (edit)';
},
sub { $granularity{ shift->sec_granularity } },
+ 'classname',
],
- 'links' => [ '', '', $edit_link, $edit_link, '' ],
- 'link_onclicks' => [ '', '', $edit_onclick, $edit_onclick, '' ],
- 'align' => 'llrrc',
+ 'links' => [ '', '', $edit_link, $edit_link, '', '' ],
+ 'link_onclicks' => [ '', '', $edit_onclick, $edit_onclick, '', '' ],
+ 'align' => 'llrrcc',
)
%>
<%once>
-my %granularity = (
- '1', => '1 second',
- '6' => '6 second',
- '30' => '30 second', # '1/2 minute',
- '60' => 'minute',
-);
+tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
my $conf = new FS::Conf;
my $money_char = $conf->config('money_char') || '$';
-my $html_init = qq(
-
-
-
-
-);
-
my $join =
' JOIN rate_region ON ( rate_detail.dest_regionnum = rate_region.regionnum )';
@@ -61,8 +51,13 @@ my $edit_link = [ 'javascript:void(0);', sub { ''; } ];
my $edit_onclick = sub {
my $rate_detail = shift;
my $ratedetailnum = $rate_detail->ratedetailnum;
- my $color = '#333399';
- qq!overlib( OLiframeContent('${p}edit/rate_detail.html?$ratedetailnum', 540, 420, 'edit_rate_detail_popup' ), CAPTION, 'Edit tax rate', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, BGCOLOR, '$color', CGCOLOR, '$color' ); return false;!;
+ include( '/elements/popup_link_onclick.html',
+ 'action' => "${p}edit/rate_detail.html?$ratedetailnum",
+ 'actionlabel' => 'Edit rate',
+ 'height' => 420,
+ #default# 'width' => 540,
+ #default# 'color' => '#333399',
+ );
};
%once>
@@ -71,6 +66,8 @@ my $edit_onclick = sub {
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+my $html_init = include('/elements/init_overlib.html');
+
$cgi->param('ratenum') =~ /^(\d+)$/ or die "unparsable ratenum";
my $ratenum = $1;
my $rate = qsearchs('rate', { 'ratenum' => $ratenum } )