1 package Reaction::UI::Widget::ActionForm;
3 use Reaction::UI::WidgetClass;
5 class ActionForm, which {
6 fragment widget [ qw/header field_list buttons footer/ ]
7 => {id => sub { $_{viewport}->location } };
9 fragment field_list [field => over func('viewport','ordered_fields')];
10 fragment field [ 'viewport' ];
12 #move button logic here
13 fragment buttons [ string {"DUMMY"} ],
14 { message => sub{ $_{viewport}->can('message') ? $_{viewport}->message : "" },
15 ok_label => func(viewport => 'ok_label'),
16 close_label => func(viewport => 'close_label'),
17 apply_label => func(viewport => 'apply_label'),
20 fragment header [ string {"DUMMY"} ];
21 fragment footer [ string {"DUMMY"} ];
23 implements fragment ok_button_fragment {
24 if (grep { $_ eq 'ok' } $_{viewport}->accept_events) {
25 arg 'event_id' => event_id 'ok';
26 arg 'label' => $_{viewport}->ok_label;
31 implements fragment apply_button_fragment {
32 if (grep { $_ eq 'apply' } $_{viewport}->accept_events) {
33 arg 'event_id' => event_id 'apply';
34 arg 'label' => $_{viewport}->apply_label;
35 render 'apply_button';
39 implements fragment cancel_button_fragment {
40 if (grep { $_ eq 'cancel' } $_{viewport}->accept_events) {
41 arg 'event_id' => event_id 'cancel';
42 arg 'label' => $_{viewport}->cancel_label;
43 render 'cancel_button';
55 Reaction::UI::Widget::ActionForm
63 Additional variables available in topic hash: "viewport".
65 Renders "header", "field_list", "buttons" and "footer"
69 Sequentially renders the C<ordered_fields> of the viewport
73 Additional variables available in topic hash: "message"
77 Content is a dummy value
81 Content is a dummy value
85 See L<Reaction::Class> for authors.
89 See L<Reaction::Class> for the license.