aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/Widget/Field/Boolean.pm
blob: 986d7b04a2f9e190acfcd1327829fe708f6cc2ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package Reaction::UI::Widget::Field::Boolean;

use Reaction::UI::WidgetClass;

class Boolean is 'Reaction::UI::Widget::Field', which {

  implements fragment is_checked {
    if ($_{viewport}->value) {
      render 'is_checked_yes';
    } else {
      render 'is_checked_no';
    }
  };

};

1;

__END__;

=head1 NAME

Reaction::UI::Widget::Field::Boolean

=head1 DESCRIPTION

See L<Reaction::UI::Widget::Field>

=head1 AUTHORS

See L<Reaction::Class> for authors.

=head1 LICENSE

See L<Reaction::Class> for the license.

=cut