X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Frate_detail.html;h=36e808fec89a4dd2ac5a6b44a38a4960456b1b7a;hb=444d079fa0fb2f09c080b58f6b1a5fed37ffd7c1;hp=5dde85f8b59d537dcbc970c6bb5768b5c6629fd8;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;p=freeside.git diff --git a/httemplate/browse/rate_detail.html b/httemplate/browse/rate_detail.html index 5dde85f8b..36e808fec 100644 --- a/httemplate/browse/rate_detail.html +++ b/httemplate/browse/rate_detail.html @@ -36,23 +36,11 @@ %> <%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 +49,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', + ); }; @@ -71,6 +64,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 } )