X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Frate_region.cgi;h=b50d2daba8e60b362512f5ed1ba1518e350f8fae;hp=cae30030a2daa70ede28d5c28da581a101b54913;hb=c49cfd25a8f92c7a2f44b51d72506a21f6b8d09f;hpb=342e2bfbe6aad470ab9dee40640f8ac7d9653003
diff --git a/httemplate/edit/rate_region.cgi b/httemplate/edit/rate_region.cgi
index cae30030a..b50d2daba 100644
--- a/httemplate/edit/rate_region.cgi
+++ b/httemplate/edit/rate_region.cgi
@@ -11,7 +11,14 @@
%# region info
-<% ntable('#cccccc') %>
+
+
+% if ( $rate_region->agent_regionid ) {
+
+ Legacy # |
+ <% $rate_region->agent_regionid |h %> |
+
+% }
Region name |
@@ -24,28 +31,47 @@
-
+ |
Prefixes
(comma-separated)
-
+ |
|
+ <& /elements/tr-checkbox.html,
+ label => 'Exact match',
+ field => 'exact_match',
+ cell_style => 'font-weight: bold',
+ value => 'Y',
+ curr_value => $rate_region->exact_match
+ &>
+
-
+
">
%# 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)',
+% ) ) {
+
+% }
<% include('/edit/elements/rate_detail.html',
- 'regionnum' => $rate_region->regionnum,
+ 'regionnum' => $rate_region->regionnum,
+ 'cdrtypenum' => $cdrtypenum,
) %>
% }
@@ -68,9 +94,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 +116,8 @@ if ( @rate_prefix ) {
unless $rate_prefix->countrycode eq $countrycode;
}
}
-
+my $cdrtypenum = '';
+if ( $cgi->param('cdrtypenum') =~ /^(\d+)$/ ) {
+ $cdrtypenum = $1;
+}
%init>