[freeside-commits] freeside/httemplate/elements tr-input-text.html, 1.1, 1.2

Ivan,,, ivan at wavetail.420.am
Thu Jan 3 18:18:38 PST 2008


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail:/tmp/cvs-serv9732

Modified Files:
	tr-input-text.html 
Log Message:
add maxlength, text-align and postfix options, escape value

Index: tr-input-text.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/tr-input-text.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- tr-input-text.html	1 Aug 2007 22:25:10 -0000	1.1
+++ tr-input-text.html	4 Jan 2008 02:18:36 -0000	1.2
@@ -5,10 +5,12 @@
     <% $opt{'prefix'} %><INPUT TYPE  = "<% $opt{type} || 'text' %>"
                                NAME  = "<% $opt{field} %>"
                                ID    = "<% $opt{id} %>"
-                               VALUE = "<% $opt{curr_value} || $opt{value} %>"
+                               VALUE = "<% $value |h %>"
                                <% $size %>
+                               <% $maxlength %>
+                               <% $align %>
                                <% $onchange %>
-                        >
+                        ><% $opt{'postfix'} %>
 
   </TD>
 
@@ -18,6 +20,8 @@
 
 my %opt = @_;
 
+my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value};
+
 my $onchange = $opt{'onchange'}
                  ? 'onChange="'. $opt{'onchange'}. '(this)"'
                  : '';
@@ -26,6 +30,15 @@
              ? 'SIZE="'. $opt{'size'}. '"'
              : '';
 
+my $maxlength = $opt{'maxlength'}
+                ? 'MAXLENGTH="'. $opt{'maxlength'}. '"'
+                : '';
+
+my $align = $opt{'text-align'}
+                ? 'STYLE="text-align: '. $opt{'text-align'}. '"'
+                : '';
+
+
 my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
 
 </%init>



More information about the freeside-commits mailing list