[freeside-commits] freeside/httemplate/edit rate_time.cgi, NONE, 1.1 rate_detail.html, 1.5, 1.6
Mark Wells
mark at wavetail.420.am
Wed Jun 30 18:53:52 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv1454/httemplate/edit
Modified Files:
rate_detail.html
Added Files:
rate_time.cgi
Log Message:
voip_cdr call rating by day and time, RT#4763
--- NEW FILE: rate_time.cgi ---
<% include("/elements/header.html","$action Time Period", menubar(
'Rate plans' => "${p}browse/rate.cgi",
) )
%>
<% include('/elements/error.html') %>
<FORM METHOD="POST" ACTION="<% "${p}edit/process/rate_time.cgi" %>">
<INPUT TYPE="hidden" NAME="ratetimenum" VALUE="<% $ratetimenum %>">
<% ntable('#cccccc',2) %>
<TABLE>
<TR>
<TH ALIGN="right">Period name</TH>
<TD><INPUT TYPE="text" NAME="ratetimename" VALUE="<% $rate_time ? $rate_time->ratetimename : '' %>"></TD>
</TR>
</TABLE>
<% include('/elements/auto-table.html',
header => [ 'Start', 'End' ],
fields => [ 'stime', 'etime' ],
size => [ 18, 18 ],
maxl => [ 15, 15 ],
align => [ 'right', 'right' ],
data => \@data,
) %>
<INPUT TYPE="submit" VALUE="<% $rate_time ? 'Apply changes' : 'Add period'%>">
</FORM>
<BR>
<A HREF="<% "${p}edit/process/rate_time.cgi?ratetimenum=$ratetimenum;delete=1" %>">Delete this period</A>
<% include('/elements/footer.html') %>
<%init>
my $ratetimenum = ($cgi->keywords)[0] || '';
my $action = 'Add';
my $rate_time;
my @data = ();
if($ratetimenum) {
$action = 'Edit';
$rate_time = qsearchs('rate_time', {ratetimenum => $ratetimenum})
or die "ratetimenum $ratetimenum not found";
@data = $rate_time->description;
}
</%init>
Index: rate_detail.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/rate_detail.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- rate_detail.html 21 Mar 2010 23:13:24 -0000 1.5
+++ rate_detail.html 1 Jul 2010 01:53:50 -0000 1.6
@@ -5,6 +5,7 @@
'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',
@@ -16,8 +17,10 @@
{ 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',
@@ -42,6 +45,12 @@
},
],
+ 'new_hashref_callback' => sub {
+ { ratenum => $cgi->param('ratenum'),
+ dest_regionnum => $cgi->param('dest_regionnum'),
+ ratetimenum => $cgi->param('ratetimenum'),
+ }
+ },
)
%>
<%once>
More information about the freeside-commits
mailing list