diff options
author | ivan <ivan> | 2008-01-04 02:18:36 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-01-04 02:18:36 +0000 |
commit | 76f0b6117b31fb5886c99727c383c2281910e118 (patch) | |
tree | e5b4df032cc4908f86100c8b07c3cfad5d0076f2 /httemplate | |
parent | 018096c84da427dcb1db73daa87463df30d0e2b3 (diff) |
add maxlength, text-align and postfix options, escape value
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/elements/tr-input-text.html | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/httemplate/elements/tr-input-text.html b/httemplate/elements/tr-input-text.html index ac21cb577..c8bec5ea6 100644 --- a/httemplate/elements/tr-input-text.html +++ b/httemplate/elements/tr-input-text.html @@ -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 @@ my $size = $opt{'size'} ? '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> |