fixed choosemany, fixed some widget stuff i broke before, renamed ordered_fields...
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Action.pm
1 package Reaction::UI::Widget::Action;
2
3 use Reaction::UI::WidgetClass;
4
5 class Action is 'Reaction::UI::Widget::Object', which {
6
7   #before fragment widget {
8   #  arg form_id => $_{viewport}->location;
9   #};
10
11   implements fragment ok_button_fragment {
12     if (grep { $_ eq 'ok' } $_{viewport}->accept_events) {
13       arg 'event_id' => event_id 'ok';
14       arg 'label' => $_{viewport}->ok_label;
15       render 'ok_button';
16     }
17   };
18
19   implements fragment apply_button_fragment {
20     if (grep { $_ eq 'apply' } $_{viewport}->accept_events) {
21       arg 'event_id' => event_id 'apply';
22       arg 'label' => $_{viewport}->apply_label;
23       render 'apply_button';
24     }
25   };
26
27   implements fragment cancel_button_fragment {
28     if (grep { $_ eq 'cancel' } $_{viewport}->accept_events) {
29       arg 'event_id' => event_id 'cancel';
30       arg 'label' => $_{viewport}->cancel_label;
31       render 'cancel_button';
32     }
33   };
34
35 };
36
37 1;
38
39 __END__;
40
41 =head1 NAME
42
43 Reaction::UI::Widget::Action
44
45 =head1 DESCRIPTION
46
47 =head1 FRAGMENTS
48
49 =head2 ok_button_fragment
50
51 =head2 apply_button_fragment
52
53 =head2 cancel_button_fragment
54
55 =head1 AUTHORS
56
57 See L<Reaction::Class> for authors.
58
59 =head1 LICENSE
60
61 See L<Reaction::Class> for the license.
62
63 =cut
64