aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/Widget/Field/Boolean.pm
diff options
context:
space:
mode:
authorgroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2007-09-24 19:28:11 +0000
committergroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2007-09-24 19:28:11 +0000
commit8f19d042dfa576c172e27ab79e3e193bcdbbbc22 (patch)
treebc0bec2a1cbd14c561dc93c2dd33e7a8d6377939 /lib/Reaction/UI/Widget/Field/Boolean.pm
parent87018d74574763fb9a02779025ea1f50cf582c3b (diff)
downloadreaction-8f19d042dfa576c172e27ab79e3e193bcdbbbc22.tar.gz
reaction-8f19d042dfa576c172e27ab79e3e193bcdbbbc22.zip
start of new widgets for fields
Diffstat (limited to 'lib/Reaction/UI/Widget/Field/Boolean.pm')
-rw-r--r--lib/Reaction/UI/Widget/Field/Boolean.pm36
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/Reaction/UI/Widget/Field/Boolean.pm b/lib/Reaction/UI/Widget/Field/Boolean.pm
new file mode 100644
index 0000000..764b7e0
--- /dev/null
+++ b/lib/Reaction/UI/Widget/Field/Boolean.pm
@@ -0,0 +1,36 @@
+package Reaction::UI::Widget::Field::Boolean;
+
+use Reaction::UI::WidgetClass;
+
+class Boolean is 'Reaction::UI::Widget::Field', which {
+
+};
+
+1;
+
+=for layout widget
+
+[% label %] [% field %] [% message %] <br>
+
+=for layout field
+
+<!-- We need a replacement for process_attrs -->
+<input type="checkbox" name="[% name %]" id="[% id %]" />
+ [% content | html %]
+</textarea>
+
+=for layout label
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <label for="[% id %]"> [% content | html %]: </label>
+[% END %]
+
+=for layout message
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% IF content %]
+ <span> [% content | html %] </span>
+[% END %]
+
+=cut