summaryrefslogtreecommitdiff
path: root/httemplate/browse
diff options
context:
space:
mode:
authormark <mark>2011-02-11 23:59:29 +0000
committermark <mark>2011-02-11 23:59:29 +0000
commit6a10d16ff4e806357abab206254aa38c80a749d3 (patch)
tree94dfb9705ba9d5aa8b3b0d1d96be6ba460115404 /httemplate/browse
parentca2b8a8c99585a4619eb657f2c7fca12a7304249 (diff)
rate selection by CDR type, RT#10991
Diffstat (limited to 'httemplate/browse')
-rw-r--r--httemplate/browse/elements/browse.html2
-rw-r--r--httemplate/browse/rate.cgi7
-rw-r--r--httemplate/browse/rate_detail.html40
-rw-r--r--httemplate/browse/rate_region.html2
4 files changed, 7 insertions, 44 deletions
diff --git a/httemplate/browse/elements/browse.html b/httemplate/browse/elements/browse.html
index 513c2c4e9..9099d6538 100644
--- a/httemplate/browse/elements/browse.html
+++ b/httemplate/browse/elements/browse.html
@@ -1,5 +1,5 @@
<% include( '/search/elements/search.html',
- 'disable_download' => 1,
+ 'really_disable_download' => 1,
'disable_nonefound' => 1,
@_,
)
diff --git a/httemplate/browse/rate.cgi b/httemplate/browse/rate.cgi
index c6cfec074..0c425a5d1 100644
--- a/httemplate/browse/rate.cgi
+++ b/httemplate/browse/rate.cgi
@@ -4,6 +4,8 @@
$p.'browse/rate_region.html',
'Time Periods' =>
$p.'browse/rate_time.html',
+ 'CDR Types' =>
+ $p.'edit/cdr_type.cgi',
],
'html_init' => $html_init,
'name' => 'rate plans',
@@ -15,6 +17,7 @@
'header' => [ '#', 'Rate plan', 'Rates' ],
'fields' => [ 'ratenum', 'ratename', $rates_sub ],
'links' => [ $link, $link, '' ],
+ 'really_disable_download' => 1
)
%>
<%once>
@@ -27,7 +30,7 @@ my $rates_sub = sub {
my $rate = shift;
my $ratenum = $rate->ratenum;
- qq( <FORM METHOD="GET" ACTION="${p}browse/rate_detail.html">
+ qq( <FORM METHOD="GET" ACTION="${p}edit/rate.cgi">
<INPUT TYPE="hidden" NAME="ratenum" VALUE="$ratenum">
<SELECT NAME="countrycode" onChange="this.form.submit();">
<OPTION SELECTED>Select Country Code
@@ -55,7 +58,7 @@ my $html_init =
my $count_query = 'SELECT COUNT(*) FROM rate';
-my $link = [ $p.'edit/rate.cgi?', 'ratenum' ];
+my $link = [ $p.'edit/rate.cgi?ratenum=', 'ratenum' ];
</%once>
<%init>
diff --git a/httemplate/browse/rate_detail.html b/httemplate/browse/rate_detail.html
deleted file mode 100644
index aef550513..000000000
--- a/httemplate/browse/rate_detail.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<% include('/elements/init_overlib.html') %>
-<% include('/elements/header.html',$title) %>
-<% include('/elements/menubar.html',@menubar) %>
-<% include('/edit/elements/rate_detail.html',
- 'ratenum' => $ratenum,
- 'countrycode' => $countrycode,
-) %>
-<% include('/elements/footer.html') %>
-
-<%once>
-
-my $conf = new FS::Conf;
-my $money_char = $conf->config('money_char') || '$';
-
-my @menubar = ( 'Rate plans' => $p.'browse/rate.cgi',
- 'Regions and Prefixes' => $p.'browse/rate_region.html',
- 'Time Periods' => $p.'browse/rate_time.html',
- );
-
-</%once>
-<%init>
-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
-
-$cgi->param('ratenum') =~ /^(\d+)$/ or die "unparsable ratenum";
-my $ratenum = $1;
-my $rate = qsearchs('rate', { 'ratenum' => $ratenum } )
- or die "unknown ratenum $ratenum";
-my $ratename = $rate->ratename;
-my $title = "$ratename rates";
-
-my $where;
-my $countrycode = '';
-if ( $cgi->param('countrycode') =~ /^(\d+)$/ ) {
- $countrycode = $1;
- $title .= " for +$countrycode";
-}
-
-</%init>
diff --git a/httemplate/browse/rate_region.html b/httemplate/browse/rate_region.html
index b7d9589d0..b958894cb 100644
--- a/httemplate/browse/rate_region.html
+++ b/httemplate/browse/rate_region.html
@@ -23,7 +23,7 @@
my $edit_url = $p.'edit/rate_region.cgi';
-my $link = [ "$edit_url?", 'regionnum' ];
+my $link = [ "$edit_url?regionnum=", 'regionnum' ];
my $html_init =
'Regions and prefixes for VoIP and call billing.<BR><BR>'.