[freeside-commits] freeside/httemplate/edit part_svc.cgi, 1.61, 1.62
Ivan,,,
ivan at wavetail.420.am
Fri May 8 17:39:15 PDT 2009
- Previous message: [freeside-commits] freeside/FS/FS Schema.pm, 1.137, 1.138 part_svc.pm, 1.32, 1.33 part_svc_column.pm, 1.5, 1.6 svc_acct.pm, 1.257, 1.258
- Next message: [freeside-commits] freeside/httemplate/view/elements svc_Common.html, 1.9, 1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv7914/httemplate/edit
Modified Files:
part_svc.cgi
Log Message:
add ability to configure service labels per-package (still need to actually use the labels), RT#4081
Index: part_svc.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/part_svc.cgi,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- part_svc.cgi 18 Mar 2009 00:30:43 -0000 1.61
+++ part_svc.cgi 9 May 2009 00:39:13 -0000 1.62
@@ -122,6 +122,7 @@
% $html .= include('/elements/table-grid.html', 'cellpadding' => 4 ).
% '<TR>'.
% '<TH CLASS="grid" BGCOLOR="#cccccc">Field</TH>'.
+% '<TH CLASS="grid" BGCOLOR="#cccccc">Label</TH>'.
% '<TH CLASS="grid" BGCOLOR="#cccccc" COLSPAN=2>Modifier</TH>'.
% '</TR>';
%
@@ -146,13 +147,15 @@
%
% foreach my $field (@fields) {
%
-% #my $def = $defs{$layer}{$field};
+% #a few lines of false laziness w/browse/part_svc.cgi
% my $def = FS::part_svc->svc_table_fields($layer)->{$field};
-% my $label = $def->{'def_label'} || $def->{'label'};
+% my $def_info = $def->{'def_info'};
% my $formatter = $def->{'format'} || sub { shift };
+%
% my $part_svc_column = $part_svc->part_svc_column($field);
+% my $label = $part_svc_column->columnlabel || $def->{'label'};
% my $value = &$formatter($part_svc_column->columnvalue);
-% my $flag = $part_svc_column->columnflag;
+% my $flag = $part_svc_column->columnflag;
%
% if ( $bgcolor eq $bgcolor1 ) {
% $bgcolor = $bgcolor2;
@@ -160,9 +163,12 @@
% $bgcolor = $bgcolor1;
% }
%
-% $html .= qq!<TR><TD CLASS="grid" BGCOLOR="$bgcolor" ALIGN="right">!.
-% ( $label || $field ).
+% $html .= qq!<TR><TD ROWSPAN=2 CLASS="grid" BGCOLOR="$bgcolor" ALIGN="right">!.
+% ( $def->{'label'} || $field ).
% "</TD>";
+%
+% $html .= qq!<TD ROWSPAN=2 CLASS="grid" BGCOLOR="$bgcolor"><INPUT NAME="${layer}__${field}_label" VALUE="!. encode_entities($label). '" STYLE="text-align:right"></TD>';
+%
% $flag = '' if $def->{type} eq 'disabled';
%
% $html .= qq!<TD CLASS="grid" BGCOLOR="$bgcolor">!;
@@ -302,6 +308,15 @@
% }
%
% $html .= "</TD></TR>\n";
+
+% $def_info = "($def_info)" if $def_info;
+% $html .=
+% qq!<TR>!.
+% qq! <TD COLSPAN=2 BGCOLOR="$bgcolor" ALIGN="center" !.
+% qq! STYLE="padding:0; border-top: none">!.
+% qq! <FONT SIZE="-1"><I>$def_info</I></FONT>!.
+% qq! </TD>!.
+% qq!</TR>\n!;
%
% } #foreach my $field (@fields) {
%
- Previous message: [freeside-commits] freeside/FS/FS Schema.pm, 1.137, 1.138 part_svc.pm, 1.32, 1.33 part_svc_column.pm, 1.5, 1.6 svc_acct.pm, 1.257, 1.258
- Next message: [freeside-commits] freeside/httemplate/view/elements svc_Common.html, 1.9, 1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list