my ($self, $events) = @_;
foreach my $event ($self->accept_events) {
if (exists $events->{$event}) {
- $self->ctx->log->debug("Applying Event: $event with value: ". $events->{$event});
+ # $self->ctx->log->debug("Applying Event: $event with value: ". $events->{$event});
$self->$event($events->{$event});
}
}
use Reaction::UI::WidgetClass;
class ActionForm, which {
- widget renders [ qw/header fields buttons footer/ ];
+ widget renders [ qw/header fields buttons footer/ ],
+ {id => sub { $_{viewport}->location } };
fields renders [field over func('viewport','ordered_fields')];
field renders [ 'viewport' ];
#move button logic here
buttons renders [ string {"DUMMY"} ],
- {message => sub{ $_{viewport}->can('message') ? $_{viewport}->message : "" } };
+ { message => sub{ $_{viewport}->can('message') ? $_{viewport}->message : "" },
+ ok_label => func(viewport => 'ok_label'),
+ close_label => func(viewport => 'close_label'),
+ apply_label => func(viewport => 'apply_label'),
+ };
+
header renders [ string {"DUMMY"} ];
footer renders [ string {"DUMMY"} ];
[% allowed_events = viewport.accept_events; %]
[% IF allowed_events.grep('^ok$').size; %]
- <input type="submit" name="[% viewport.event_id_for('ok') | html%]" value="ok" />
+ <input type="submit" name="[% viewport.event_id_for('ok') | html%]" value="[% ok_label %]" />
[% END; %]
[% IF (viewport.ordered_fields.size != 0) && allowed_events.grep('^apply$').size; %]
- <input type="submit" name="[% viewport.event_id_for('apply') | html%]" value="apply" />
+ <input type="submit" name="[% viewport.event_id_for('apply') | html%]" value="[% apply_label %]" />
[% END; %]
[% IF allowed_events.grep('^close$').size; %]
- <input type="submit" name="[% viewport.event_id_for('close') | html%]" value="cancel" />
+ <input type="submit" name="[% viewport.event_id_for('close') | html%]" value="[% close_label %]" />
[% END; %]
<br />