[freeside-commits] freeside/httemplate/edit usage_class.html, NONE, 1.1 rate_detail.html, 1.2, 1.3 rate_region.cgi, 1.10, 1.11
Jeff Finucane,420,,
jeff at wavetail.420.am
Sat Aug 23 14:59:47 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv1980/httemplate/edit
Modified Files:
rate_detail.html rate_region.cgi
Added Files:
usage_class.html
Log Message:
add usage classes to rate details
Index: rate_region.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/rate_region.cgi,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- rate_region.cgi 19 Aug 2008 10:06:45 -0000 1.10
+++ rate_region.cgi 23 Aug 2008 21:59:45 -0000 1.11
@@ -57,6 +57,9 @@
<TH CLASS="grid" BGCOLOR="#cccccc">
<FONT SIZE=-1>Granularity</FONT>
</TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc">
+ <FONT SIZE=-1>Usage class</FONT>
+ </TH>
</TR>
% foreach my $rate ( qsearch('rate', {}) ) {
@@ -96,6 +99,19 @@
</SELECT>
</TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
+ <% include( '/elements/select-table.html',
+ 'element_name' => "classnum$n",
+ 'table' => 'usage_class',
+ 'name_col' => 'classname',
+ 'empty_label' => '(default)',
+ 'hashref' => { disabled => '' },
+ 'curr_value' => ( $cgi->param("classnum$n") ||
+ $rate_detail->classnum ),
+ )
+ %>
+ </TD>
+
</TR>
% }
--- NEW FILE: usage_class.html ---
<% include( 'elements/edit.html',
'name_singular' => 'Usage Class',
'table' => 'usage_class',
'fields' => [
'classname',
{ field=>'disabled',
type=>'checkbox',
value=>'Y',
},
],
'labels' => {
'classnum' => 'Class number',
'classname' => 'Class name',
'disabled' => 'Disable class',
},
'viewall_dir' => 'browse',
)
%>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
</%init>
Index: rate_detail.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/rate_detail.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- rate_detail.html 26 Mar 2008 15:43:06 -0000 1.2
+++ rate_detail.html 23 Aug 2008 21:59:45 -0000 1.3
@@ -8,6 +8,7 @@
'min_included' => 'Included minutes',
'min_charge' => 'Charge per minute',
'sec_granularity' => 'Granularity',
+ 'classnum' => 'Usage class',
},
'fields' => [
{ field=>'ratenum', type=>'hidden', },
@@ -23,6 +24,13 @@
labels => \%granularity,
disable_empty => 1,
},
+ { field =>'classnum',
+ type =>'select-table',
+ table =>'usage_class',
+ name_col =>'classname',
+ empty_label =>'(default)',
+ hashref =>{ disabled => '' },
+ },
],
)
More information about the freeside-commits
mailing list