diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-08-25 23:33:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 23:33:34 +0200 |
commit | 5b0e8cc92b9ca0ab0dc24366d95f67a88c470173 (patch) | |
tree | e25c081fa76f34436d859b1f9674287d790bc657 /app/controllers/admin | |
parent | d696f729f1dc27c9d92b896c651e1ea73bf93d75 (diff) |
Add ability to select all accounts matching search for batch actions (#19053)
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/accounts_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb index 46c9aba91..40bf685c5 100644 --- a/app/controllers/admin/accounts_controller.rb +++ b/app/controllers/admin/accounts_controller.rb @@ -16,7 +16,11 @@ module Admin def batch authorize :account, :index? - @form = Form::AccountBatch.new(form_account_batch_params.merge(current_account: current_account, action: action_from_button)) + @form = Form::AccountBatch.new(form_account_batch_params) + @form.current_account = current_account + @form.action = action_from_button + @form.select_all_matching = params[:select_all_matching] + @form.query = filtered_accounts @form.save rescue ActionController::ParameterMissing flash[:alert] = I18n.t('admin.accounts.no_account_selected') |