5317ba033f128e46b6373a64268adf5969a130a1
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Field / Mutable / Boolean.pm
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
7   after fragment widget {
8      arg 'field_type' => 'checkbox';
9   };
10   
11   implements fragment is_checked {
12     warn "WAH: ".$_{viewport}->value_string."; ".$_{viewport}->value." WAAAH ".$_{viewport};
13     if ($_{viewport}->value) {
14       render 'is_checked_yes';
15     } else {
16       render 'is_checked_no';
17     }
18   };
19
20 };
21
22 1;
23
24 __END__;
25
26 =head1 NAME
27
28 Reaction::UI::Widget::Field::Boolean
29
30 =head1 DESCRIPTION
31
32 See L<Reaction::UI::Widget::Field>
33
34 =head1 AUTHORS
35
36 See L<Reaction::Class> for authors.
37
38 =head1 LICENSE
39
40 See L<Reaction::Class> for the license.
41
42 =cut