summaryrefslogtreecommitdiff
path: root/httemplate/edit/rate_detail.html
diff options
context:
space:
mode:
authorcvs2git <cvs2git>2010-12-27 00:04:45 +0000
committercvs2git <cvs2git>2010-12-27 00:04:45 +0000
commitc82d349f864e6bd9f96fd1156903bc1f7193a203 (patch)
treee117a87533656110b6acd56fc0ca64289892a9f5 /httemplate/edit/rate_detail.html
parent74e058c8a010ef6feb539248a550d0bb169c1e94 (diff)
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'httemplate/edit/rate_detail.html')
-rw-r--r--httemplate/edit/rate_detail.html81
1 files changed, 0 insertions, 81 deletions
diff --git a/httemplate/edit/rate_detail.html b/httemplate/edit/rate_detail.html
deleted file mode 100644
index ec04e4cbb..000000000
--- a/httemplate/edit/rate_detail.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<% include('elements/edit.html',
- 'popup' => 1,
- 'name' => $name,
- 'table' => 'rate_detail',
- 'labels' => { 'ratedetailnum' => 'Rate', #should hide...
- 'dest_regionname' => 'Region',
- 'dest_prefixes_short' => 'Prefix(es)',
- 'rate_time_name' => 'Time period',
- 'min_included' => 'Included minutes/calls',
- 'conn_charge' => 'Connection charge',
- 'conn_sec' => 'For',
- 'min_charge' => 'Charge per minute/call',
- 'sec_granularity' => 'Granularity',
- 'classnum' => 'Usage class',
- },
- 'fields' => [
- { field=>'ratenum', type=>'hidden', },
- { field=>'orig_regionnum', type=>'hidden', },
- { field=>'dest_regionnum', type=>'hidden', },
- { field=>'ratetimenum', type=>'hidden', },
- { field=>'dest_regionname', type=>'fixed', },
- { field=>'dest_prefixes_short', type=>'fixed', },
- { field=>'rate_time_name', type=>'fixed', },
- { field=>'min_included', type=>'text', size=>5 },
- { field=>'conn_charge', type=>'money', size=>4 },
- { field =>'conn_sec',
- type =>'select',
- options => [ keys %conn_secs ],
- labels => \%conn_secs,
- disable_empty => 1,
- },
- { field=>'min_charge', type=>'money', size=>4 },
- { field =>'sec_granularity',
- type =>'select',
- options => [ keys %granularity ],
- labels => \%granularity,
- disable_empty => 1,
- },
- { field =>'classnum',
- type =>'select-table',
- table =>'usage_class',
- name_col =>'classname',
- empty_label =>'(default)',
- hashref =>{ disabled => '' },
- },
-
- ],
- 'new_hashref_callback' => sub {
- { ratenum => $cgi->param('ratenum'),
- dest_regionnum => $cgi->param('dest_regionnum'),
- ratetimenum => $cgi->param('ratetimenum'),
- }
- },
- )
-%>
-<%once>
-
-tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
-tie my %conn_secs, 'Tie::IxHash', FS::rate_detail::conn_secs();
-
-</%once>
-<%init>
-
-my $conf = new FS::Conf;
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
-
-#slightly inefficient, i suppose an edit+error callback would be better
-my $name = 'rate';
-my ($keywords) = $cgi->keywords;
-if ( $keywords =~ /^(\d+)$/
- || $cgi->param('ratedetailnum') =~ /^(\d+)$/ ) {
- my $rate_detail = qsearchs('rate_detail', { 'ratedetailnum' => $1 } )
- or die "unknown ratedetailnum $1";
- $name =
- $rate_detail->rate->ratename. ' rate for '. $rate_detail->dest_regionname;
-}
-
-#sec_granularity should default to 60! for new rates when this gets used for em
-
-</%init>