From 5dfa532c0d982a8ce9a6e7aa0922a138efe3bb34 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 30 Jan 2017 16:36:49 +0100 Subject: [PATCH] =?utf8?q?ActionBar:=20Verwendung=20bei=20=C2=BBPreise=20a?= =?utf8?q?ktualisieren=C2=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/PartsPriceUpdate.pm | 35 +++++++++++++++++++ .../webpages/ic/confirm_price_update.html | 9 ++--- .../webpages/ic/search_update_prices.html | 8 +---- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/SL/Controller/PartsPriceUpdate.pm b/SL/Controller/PartsPriceUpdate.pm index 6d131f10e..9d24c503d 100644 --- a/SL/Controller/PartsPriceUpdate.pm +++ b/SL/Controller/PartsPriceUpdate.pm @@ -21,6 +21,7 @@ __PACKAGE__->run_before('check_rights'); sub action_search_update_prices { my ($self) = @_; + $self->setup_search_update_prices_action_bar; $self->render('ic/search_update_prices', title => t8('Update Prices'), ); @@ -64,6 +65,7 @@ sub action_confirm_price_update { 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, @@ -278,4 +280,37 @@ sub init_filter { $::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; diff --git a/templates/webpages/ic/confirm_price_update.html b/templates/webpages/ic/confirm_price_update.html index ae2e0ace4..ed18d7ecc 100644 --- a/templates/webpages/ic/confirm_price_update.html +++ b/templates/webpages/ic/confirm_price_update.html @@ -3,7 +3,7 @@ [%- USE LxERP %] [%- USE L %] -
+

[% 'Confirm!' | $T8 %]

@@ -11,10 +11,5 @@

[% 'Are you sure you want to update the prices' | $T8 %]?

-

- [% L.hidden_tag('filter_key', filter_key) %] - [% L.hidden_tag('action', 'PartsPriceUpdate/dispatch') %] - - -

+ [% L.hidden_tag('filter_key', filter_key) %]
diff --git a/templates/webpages/ic/search_update_prices.html b/templates/webpages/ic/search_update_prices.html index 3c60782c7..1ea0f6b32 100644 --- a/templates/webpages/ic/search_update_prices.html +++ b/templates/webpages/ic/search_update_prices.html @@ -6,7 +6,7 @@ [% PROCESS 'common/flash.html' %] -
+ @@ -102,10 +102,4 @@ [%- END %]
[% 'Part Number' | $T8 %]
- -
- - [% L.hidden_tag('action', 'PartsPriceUpdate/dispatch') %] -
- -- 2.20.1