From b7b1509d7ecdd333a1b8449a851aa8fc7d5cda62 Mon Sep 17 00:00:00 2001 From: Philipp Metzner Date: Wed, 21 Jan 2026 18:40:29 +0100 Subject: [PATCH] Change ManageBeneficiaries buttons - "Export" button: rename to "Export Selected" - "Export All" button: - rename to "Export All Records" - only show if no filters applied, and if base has more than 500 beneficiaries - otherwise it's confusing to have applied a filter, and seeing "Export All" (when in fact one must click "Select All", then "Export") --- include/people.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/people.php b/include/people.php index 360b4029..ab0f170b 100644 --- a/include/people.php +++ b/include/people.php @@ -97,11 +97,11 @@ function () use ($action, &$cmsmain) { addpagemenu('deactivated', 'Deactivated', ['link' => '?action=people_deactivated']); // List Buttons - addbutton('export', 'Export', ['icon' => 'fa-download', 'showalways' => false, 'testid' => 'exportBeneficiariesButton']); + addbutton('export', 'Export Selected', ['icon' => 'fa-download', 'showalways' => false, 'testid' => 'exportBeneficiariesButton']); - // Show export all button if there are more than 500 beneficiaries - if ($number_of_people > 500) { - addbutton('export_all', 'Export All', ['icon' => 'fa-download', 'showalways' => true, 'testid' => 'exportAllBeneficiariesButton']); + // Show export all button if there are more than 500 beneficiaries, and if no filters applied + if (($number_of_people >= 500) && !$is_filtered) { + addbutton('export_all', 'Export All Records', ['icon' => 'fa-download', 'showalways' => true, 'testid' => 'exportAllBeneficiariesButton']); } if (!empty($tags)) { addbutton('tag', 'Add Tag', ['icon' => 'fa-tag', 'options' => $tags]);