aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/Widget/Field/Boolean.pm
diff options
context:
space:
mode:
authorgroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2007-09-26 22:39:13 +0000
committergroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2007-09-26 22:39:13 +0000
commit9de685fc288409d8b92e41f1e23b67562ea407f8 (patch)
tree25ed5d37a323293d60e4bda934b85ee271083525 /lib/Reaction/UI/Widget/Field/Boolean.pm
parent8f19d042dfa576c172e27ab79e3e193bcdbbbc22 (diff)
downloadreaction-9de685fc288409d8b92e41f1e23b67562ea407f8.tar.gz
reaction-9de685fc288409d8b92e41f1e23b67562ea407f8.zip
more Widget updates. this breaks old-style templates, also changed how VPs behave to play better with Widgets. tagging mst, make the search path thing now, I am ready to test!
Diffstat (limited to 'lib/Reaction/UI/Widget/Field/Boolean.pm')
-rw-r--r--lib/Reaction/UI/Widget/Field/Boolean.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Reaction/UI/Widget/Field/Boolean.pm b/lib/Reaction/UI/Widget/Field/Boolean.pm
index 764b7e0..c6afaff 100644
--- a/lib/Reaction/UI/Widget/Field/Boolean.pm
+++ b/lib/Reaction/UI/Widget/Field/Boolean.pm
@@ -14,10 +14,16 @@ class Boolean is 'Reaction::UI::Widget::Field', which {
=for layout field
+[%
+ IF content;
+ checked = 'checked="checked"';
+ ELSE;
+ checked = "";
+ END;
+%]
+
<!-- We need a replacement for process_attrs -->
-<input type="checkbox" name="[% name %]" id="[% id %]" />
- [% content | html %]
-</textarea>
+<input type="checkbox" id="[% id | html %]" name="[% name | html %]" value="1" [% checked %] />
=for layout label