From 5f1bf925ef7de76ebb88e096243a291a11fbd945 Mon Sep 17 00:00:00 2001 From: William Mortada Date: Sat, 2 Dec 2023 16:24:19 +0000 Subject: [PATCH] Standalone - delete en/disable actions for roles --- .../SavedSearch_Administer_Roles.mgd.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/ext/standaloneusers/managed/SavedSearch_Administer_Roles.mgd.php b/ext/standaloneusers/managed/SavedSearch_Administer_Roles.mgd.php index d01d517a85..daf5cb3772 100644 --- a/ext/standaloneusers/managed/SavedSearch_Administer_Roles.mgd.php +++ b/ext/standaloneusers/managed/SavedSearch_Administer_Roles.mgd.php @@ -20,6 +20,7 @@ return [ 'version' => 4, 'select' => [ 'id', + 'name', 'label', 'is_active', ], @@ -56,6 +57,13 @@ return [ 'pager' => [], 'placeholder' => 5, 'columns' => [ + [ + 'type' => 'field', + 'key' => 'name', + 'dataType' => 'String', + 'label' => E::ts('Name'), + 'sortable' => TRUE, + ], [ 'type' => 'field', 'key' => 'label', @@ -87,6 +95,32 @@ return [ 'path' => '', 'condition' => [], ], + [ + 'task' => 'enable', + 'entity' => 'Role', + 'target' => 'crm-popup', + 'icon' => 'fa-toggle-on', + 'text' => E::ts('Enable'), + 'style' => 'default', + 'condition' => ['is_active', '=', FALSE], + ], + [ + 'task' => 'disable', + 'entity' => 'Role', + 'target' => 'crm-popup', + 'icon' => 'fa-toggle-off', + 'text' => E::ts('Disable'), + 'style' => 'default', + 'condition' => ['is_active', '=', TRUE], + ], + [ + 'entity' => 'Role', + 'task' => 'delete', + 'target' => 'crm-popup', + 'icon' => 'fa-trash', + 'text' => E::ts('Delete'), + 'style' => 'danger', + ], ], 'type' => 'menu', 'icon' => 'fa-bars', -- 2.25.1