From: Moritz Bunkus Date: Mon, 30 Jan 2017 15:36:49 +0000 (+0100) Subject: ActionBar: Verwendung bei »Preise aktualisieren« X-Git-Tag: release-3.5.4~1275 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5dfa532c0d982a8ce9a6e7aa0922a138efe3bb34;p=kivitendo-erp.git ActionBar: Verwendung bei »Preise aktualisieren« --- 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') %] -
-