From 0b559f229d5894f59c89918800e4a46a3cb67906 Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Mon, 30 Mar 2026 08:39:39 -0400 Subject: [PATCH] Allow termination of petition from index view (CO-2961) --- app/resources/locales/en_US/operation.po | 3 +++ app/templates/Petitions/columns.inc | 12 +++++++++++- app/templates/Standard/index.php | 8 +++----- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/app/resources/locales/en_US/operation.po b/app/resources/locales/en_US/operation.po index f1c2a522e..8b8df0889 100644 --- a/app/resources/locales/en_US/operation.po +++ b/app/resources/locales/en_US/operation.po @@ -285,6 +285,9 @@ msgstr "Rerun" msgid "Petitions.terminate.confirm" msgstr "Are you sure you want to terminate Petition {0}? This action cannot be undone." +msgid "Petitions.terminate.confirm.this" +msgstr "Are you sure you want to terminate this Petition? This action cannot be undone." + msgid "pick" msgstr "Pick" diff --git a/app/templates/Petitions/columns.inc b/app/templates/Petitions/columns.inc index 2022518a2..66253017a 100644 --- a/app/templates/Petitions/columns.inc +++ b/app/templates/Petitions/columns.inc @@ -96,5 +96,15 @@ $rowActions = [ 'icon' => 'resume', 'label' => __d('operation', 'resume'), 'if' => 'isResumable' - ] + ], + [ + 'controller' => 'petitions', + 'action' => 'terminate', + 'icon' => 'cancel', + 'label' => __d('operation', 'terminate'), + 'confirm' => [ + 'dg_body_txt' => __d('operation', 'Petitions.terminate.confirm.this'), + 'dg_confirm_btn' => __d('operation', 'terminate') + ] + ], ]; \ No newline at end of file diff --git a/app/templates/Standard/index.php b/app/templates/Standard/index.php index 4380edc24..53fb21d9a 100644 --- a/app/templates/Standard/index.php +++ b/app/templates/Standard/index.php @@ -187,11 +187,9 @@ - - - - element('flash', $flashArgs); ?> - + + +element('flash', $flashArgs); ?>