Commit | Line | Data |
2f670e13 |
1 | package Reaction::UI::Widget::Field::Mutable::Boolean; |
2 | |
3 | use Reaction::UI::WidgetClass; |
4 | |
5 | class Boolean is 'Reaction::UI::Widget::Field::Mutable', which { |
6 | |
3fad510b |
7 | after fragment widget { |
8 | arg 'field_type' => 'checkbox'; |
9 | }; |
10 | |
2f670e13 |
11 | implements fragment is_checked { |
12 | if ($_{viewport}->value) { |
13 | render 'is_checked_yes'; |
14 | } else { |
15 | render 'is_checked_no'; |
16 | } |
17 | }; |
18 | |
19 | }; |
20 | |
21 | 1; |
22 | |
23 | __END__; |
24 | |
25 | =head1 NAME |
26 | |
27 | Reaction::UI::Widget::Field::Boolean |
28 | |
29 | =head1 DESCRIPTION |
30 | |
31 | See L<Reaction::UI::Widget::Field> |
32 | |
33 | =head1 AUTHORS |
34 | |
35 | See L<Reaction::Class> for authors. |
36 | |
37 | =head1 LICENSE |
38 | |
39 | See L<Reaction::Class> for the license. |
40 | |
41 | =cut |