port actionform, field widgets to declarative system
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Field / Boolean.pm
1 package Reaction::UI::Widget::Field::Boolean;
2
3 use Reaction::UI::WidgetClass;
4
5 class Boolean is 'Reaction::UI::Widget::Field', which {
6
7   implements fragment is_checked {
8     if ($_{viewport}->value) {
9       render 'is_checked_yes';
10     } else {
11       render 'is_checked_no';
12     }
13   };
14
15 };
16
17 1;
18
19 __END__;
20
21 =head1 NAME
22
23 Reaction::UI::Widget::Field::Boolean
24
25 =head1 DESCRIPTION
26
27 See L<Reaction::UI::Widget::Field>
28
29 =head1 AUTHORS
30
31 See L<Reaction::Class> for authors.
32
33 =head1 LICENSE
34
35 See L<Reaction::Class> for the license.
36
37 =cut