X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Frate_region.cgi;h=367bbafb608e388409fb1eb797336e69d0099a08;hb=573139dbd6c37808697bfa72a3a468bb0980d4dd;hp=cae30030a2daa70ede28d5c28da581a101b54913;hpb=342e2bfbe6aad470ab9dee40640f8ac7d9653003;p=freeside.git diff --git a/httemplate/edit/rate_region.cgi b/httemplate/edit/rate_region.cgi index cae30030a..367bbafb6 100644 --- a/httemplate/edit/rate_region.cgi +++ b/httemplate/edit/rate_region.cgi @@ -35,17 +35,28 @@ -

+
"> %# rate plan info, if the region has been created yet % if($rate_region->regionnum) { -
-
-Rates in this region +

Rates in this region +% if ( my $select_cdr_type = include('/elements/select-cdr_type.html', +% 'curr_value' => $cdrtypenum, +% 'onchange' => 'form.submit();', +% 'name_col' => 'cdrtypename', +% 'value_col' => 'cdrtypenum', +% 'empty_label' => '(default)', +% ) ) { +
+ +Usage type: <% $select_cdr_type %> +
+% } <% include('/edit/elements/rate_detail.html', - 'regionnum' => $rate_region->regionnum, + 'regionnum' => $rate_region->regionnum, + 'cdrtypenum' => $cdrtypenum, ) %> % } @@ -68,9 +79,8 @@ if ( $cgi->param('error') ) { $rate_region = new FS::rate_region ( { map { $_, scalar($cgi->param($_)) } fields('rate_region') } ); -} elsif ( $cgi->keywords ) { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/ or die "unparsable regionnum"; +} elsif ( $cgi->param('regionnum') ) { + $cgi->param('regionnum') =~ /^(\d+)$/ or die "unparseable regionnum"; $rate_region = qsearchs( 'rate_region', { 'regionnum' => $1 } ) or die "unknown regionnum $1\n"; } else { #adding @@ -91,5 +101,8 @@ if ( @rate_prefix ) { unless $rate_prefix->countrycode eq $countrycode; } } - +my $cdrtypenum = ''; +if ( $cgi->param('cdrtypenum') =~ /^(\d+)$/ ) { + $cdrtypenum = $1; +}