[freeside-commits] freeside/httemplate/view/elements svc_Common.html, 1.13, 1.14

Erik Levinson levinse at wavetail.420.am
Thu Nov 25 12:02:57 PST 2010


Update of /home/cvs/cvsroot/freeside/httemplate/view/elements
In directory wavetail.420.am:/tmp/cvs-serv27529/httemplate/view/elements

Modified Files:
	svc_Common.html 
Log Message:
more sane svc_dsl UI, RT7111


Index: svc_Common.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/elements/svc_Common.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -w -d -r1.13 -r1.14
--- svc_Common.html	25 Nov 2010 01:46:34 -0000	1.13
+++ svc_Common.html	25 Nov 2010 20:02:55 -0000	1.14
@@ -65,10 +65,10 @@
 %
 %   my($field, $type, $value, $hack_strict_refs);
 %   if ( ref($f) ) {
-%     $field = $f->{'field'},
+%     $field = $f->{'field'};
 %     $hack_strict_refs = \&{ $f->{'value'} } if $f->{'value'};
 %     $value = $f->{'value'} ? &$hack_strict_refs($svc_x) : $svc_x->$field;
-%     $type  = $f->{'type'} || 'text',
+%     $type  = $f->{'type'} || 'text';
 %   } else {
 %     $field = $f;
 %     $value = $svc_x->$field;
@@ -86,6 +86,9 @@
           %>
         </TD>
 
+%	$value = time2str($date_format,$value) if ( $type eq 'date' && $value );
+%	$value = time2str("$date_format %H:%M",$value) if ( $type eq 'datetime' && $value );
+%	$value = $value eq 'Y' ? 'Yes' : 'No' if ( $type eq 'checkbox' );
 %       #eventually more options for <SELECT>, etc. fields
 
         <TD BGCOLOR="#ffffff"><% $value %><TD>
@@ -125,6 +128,9 @@
 
 my(%opt) = @_;
 
+my $conf = new FS::Conf;
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
+
 my $table = $opt{'table'};
 
 my $fields = $opt{'fields'}



More information about the freeside-commits mailing list