From: Hypolite Petovan Date: Sun, 5 Sep 2021 18:49:52 +0000 (-0400) Subject: Add redirect URL parameter to contact batch X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5262843e63ae734c2df3ae54491cb816afe20cc0;p=friendica.git Add redirect URL parameter to contact batch - This allows redirection to the correct contact tab after a batch action --- diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 4233be4625..bfed6495ae 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -88,7 +88,7 @@ class Contact extends BaseModule 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 = []) diff --git a/view/templates/contacts-template.tpl b/view/templates/contacts-template.tpl index 1631640a0a..9253b862aa 100644 --- a/view/templates/contacts-template.tpl +++ b/view/templates/contacts-template.tpl @@ -15,6 +15,7 @@ {{$tabs nofilter}}
+ {{foreach $contacts as $contact}} {{include file="contact_template.tpl"}} {{/foreach}} diff --git a/view/theme/frio/templates/contacts-template.tpl b/view/theme/frio/templates/contacts-template.tpl index ad8a267927..c6a9865a01 100644 --- a/view/theme/frio/templates/contacts-template.tpl +++ b/view/theme/frio/templates/contacts-template.tpl @@ -29,6 +29,7 @@ {{* we need the form container to make batch actions work *}} + {{* we put here a hidden input element. This is needed to transmit the batch actions with javascript*}}