1 package Reaction::UI::Widget::ActionForm;
3 use Reaction::UI::WidgetClass;
5 class ActionForm, which {
6 widget renders [qw/header fields buttons footer/
7 => { viewport => func('self','viewport') } ];
9 fields renders [viewport over func('self','ordered_fields')];
11 buttons renders [ string {"DUMMY"} ], {message => func('viewport','message');
12 header renders [ string {"DUMMY"} ];
13 footer renders [ string {"DUMMY"} ];
23 <form action="" method="post" enctype="multipart/form-data">
41 <span>[% message %]</span> <br />
44 [% allowed_events = viewport.accept_events; %]
45 [% IF allowed_events.grep('^ok$').size; %]
46 <input type="submit" name="[% viewport.event_id_for('ok') | html%]" value="ok" />
49 [% IF (viewport.ordered_fields.size != 0) && allowed_events.grep('^apply$').size; %]
50 <input type="submit" name="[% viewport.event_id_for('apply') | html%]" value="apply" />
53 [% IF allowed_events.grep('^close$').size; %]
54 <input type="submit" name="[% viewport.event_id_for('close') | html%]" value="cancel" />