projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
018096c
)
add maxlength, text-align and postfix options, escape value
author
ivan
<ivan>
Fri, 4 Jan 2008 02:18:36 +0000
(
02:18
+0000)
committer
ivan
<ivan>
Fri, 4 Jan 2008 02:18:36 +0000
(
02:18
+0000)
httemplate/elements/tr-input-text.html
patch
|
blob
|
history
diff --git
a/httemplate/elements/tr-input-text.html
b/httemplate/elements/tr-input-text.html
index
ac21cb5
..
c8bec5e
100644
(file)
--- 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} %>"
<% $opt{'prefix'} %><INPUT TYPE = "<% $opt{type} || 'text' %>"
NAME = "<% $opt{field} %>"
ID = "<% $opt{id} %>"
- VALUE = "<% $
opt{curr_value} || $opt{value}
%>"
+ VALUE = "<% $
value |h
%>"
<% $size %>
<% $size %>
+ <% $maxlength %>
+ <% $align %>
<% $onchange %>
<% $onchange %>
- >
+ >
<% $opt{'postfix'} %>
</TD>
</TD>
@@
-18,6
+20,8
@@
my %opt = @_;
my %opt = @_;
+my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value};
+
my $onchange = $opt{'onchange'}
? 'onChange="'. $opt{'onchange'}. '(this)"'
: '';
my $onchange = $opt{'onchange'}
? 'onChange="'. $opt{'onchange'}. '(this)"'
: '';
@@
-26,6
+30,15
@@
my $size = $opt{'size'}
? '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>
my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
</%init>