projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e3dffa2
)
add disabled option to text elements
author
ivan
<ivan>
Sun, 13 Apr 2008 08:21:42 +0000
(08:21 +0000)
committer
ivan
<ivan>
Sun, 13 Apr 2008 08:21:42 +0000
(08:21 +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
c8bec5e
..
49ae166
100644
(file)
--- a/
httemplate/elements/tr-input-text.html
+++ b/
httemplate/elements/tr-input-text.html
@@
-1,6
+1,6
@@
<% include('tr-td-label.html', @_ ) %>
<% include('tr-td-label.html', @_ ) %>
- <TD <% $style %>>
+ <TD <% $
cell_
style %>>
<% $opt{'prefix'} %><INPUT TYPE = "<% $opt{type} || 'text' %>"
NAME = "<% $opt{field} %>"
<% $opt{'prefix'} %><INPUT TYPE = "<% $opt{type} || 'text' %>"
NAME = "<% $opt{field} %>"
@@
-8,7
+8,8
@@
VALUE = "<% $value |h %>"
<% $size %>
<% $maxlength %>
VALUE = "<% $value |h %>"
<% $size %>
<% $maxlength %>
- <% $align %>
+ <% $style %>
+ <% $opt{disabled} %>
<% $onchange %>
><% $opt{'postfix'} %>
<% $onchange %>
><% $opt{'postfix'} %>
@@
-34,11
+35,19
@@
my $maxlength = $opt{'maxlength'}
? 'MAXLENGTH="'. $opt{'maxlength'}. '"'
: '';
? 'MAXLENGTH="'. $opt{'maxlength'}. '"'
: '';
-my $align = $opt{'text-align'}
- ? 'STYLE="text-align: '. $opt{'text-align'}. '"'
- : '';
+my @style = ();
+
+push @style, 'text-align: '. $opt{'text-align'}
+ if $opt{'text-align'};
+
+push @style, 'background-color: #dddddd'
+ if $opt{'disabled'};
+
+$opt{'disabled'} = 'DISABLED'
+ if $opt{'disabled'} && $opt{'disabled'} !~ /disabled/i; # uuh... yeah?
+my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : '';
-my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
+my $
cell_
style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
</%init>
</%init>