Add redirect URL parameter to contact batch
- This allows redirection to the correct contact tab after a batch action
This commit is contained in:
parent
6e358bfacf
commit
5262843e63
3 changed files with 3 additions and 1 deletions
|
@ -88,7 +88,7 @@ class Contact extends BaseModule
|
||||||
info(DI::l10n()->tt('%d contact edited.', '%d contacts edited.', $count_actions));
|
info(DI::l10n()->tt('%d contact edited.', '%d contacts edited.', $count_actions));
|
||||||
}
|
}
|
||||||
|
|
||||||
DI::baseUrl()->redirect('contact');
|
DI::baseUrl()->redirect($_POST['redirect_url'] ?? 'contact');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function post(array $parameters = [])
|
public static function post(array $parameters = [])
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
{{$tabs nofilter}}
|
{{$tabs nofilter}}
|
||||||
|
|
||||||
<form action="{{$baseurl}}/contact/batch/" method="POST">
|
<form action="{{$baseurl}}/contact/batch/" method="POST">
|
||||||
|
<input type="hidden" name="redirect_url" value="{{$cmd}}"/>
|
||||||
{{foreach $contacts as $contact}}
|
{{foreach $contacts as $contact}}
|
||||||
{{include file="contact_template.tpl"}}
|
{{include file="contact_template.tpl"}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
{{* we need the form container to make batch actions work *}}
|
{{* we need the form container to make batch actions work *}}
|
||||||
<form name="batch_actions_submit" action="{{$baseurl}}/contact/batch/" method="POST">
|
<form name="batch_actions_submit" action="{{$baseurl}}/contact/batch/" method="POST">
|
||||||
|
<input type="hidden" name="redirect_url" value="{{$cmd}}"/>
|
||||||
|
|
||||||
{{* we put here a hidden input element. This is needed to transmit the batch actions with javascript*}}
|
{{* we put here a hidden input element. This is needed to transmit the batch actions with javascript*}}
|
||||||
<input type="hidden" class="batch-action no-input fakelist" name="batch_submit" value="{{$l}}">
|
<input type="hidden" class="batch-action no-input fakelist" name="batch_submit" value="{{$l}}">
|
||||||
|
|
Loading…
Reference in a new issue