Add ability to select all accounts matching search for batch actions (#19053)
This commit is contained in:
parent
d696f729f1
commit
5b0e8cc92b
7 changed files with 138 additions and 4 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue