sub action_search_update_prices {
my ($self) = @_;
+ $self->setup_search_update_prices_action_bar;
$self->render('ic/search_update_prices',
title => t8('Update Prices'),
);
my $key = $::auth->create_unique_sesion_value(SL::JSON::to_json($self->filter));
+ $self->setup_confirm_price_update_action_bar;
$self->render('ic/confirm_price_update',
num_matches => $num_matches,
filter_key => $key,
$::form->{filter} || {};
}
+sub setup_search_update_prices_action_bar {
+ my ($self, %params) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Continue'),
+ submit => [ '#form', { action => 'PartsPriceUpdate/confirm_price_update' } ],
+ accesskey => 'enter',
+ ],
+ );
+ }
+}
+
+sub setup_confirm_price_update_action_bar {
+ my ($self, %params) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Continue'),
+ submit => [ '#form', { action => 'PartsPriceUpdate/update_prices' } ],
+ accesskey => 'enter',
+ ],
+
+ action => [
+ t8('Back'),
+ call => [ 'kivi.history_back' ],
+ ],
+ );
+ }
+}
+
1;
[%- USE LxERP %]
[%- USE L %]
- <form method="post" action="controller.pl">
+ <form method="post" action="controller.pl" id="form">
<h2 class="confirm">[% 'Confirm!' | $T8 %]</h2>
<p>[% 'Are you sure you want to update the prices' | $T8 %]?</p>
- <p>
- [% L.hidden_tag('filter_key', filter_key) %]
- [% L.hidden_tag('action', 'PartsPriceUpdate/dispatch') %]
- <input name="action_update_prices" class="submit" type="submit" value="[% 'Continue' | $T8 %]">
- <input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]">
- </p>
+ [% L.hidden_tag('filter_key', filter_key) %]
</form>
[% PROCESS 'common/flash.html' %]
-<form method="post" action="controller.pl">
+<form method="post" action="controller.pl" id="form">
<table>
<tr>
<th align="right" nowrap>[% 'Part Number' | $T8 %]</th>
[%- END %]
</table>
-
- <hr size="3" noshade>
-
- [% L.hidden_tag('action', 'PartsPriceUpdate/dispatch') %]
- <input class="submit" type="submit" name="action_confirm_price_update" value="[% 'Continue' | $T8 %]">
</form>
-