From ee6bc31de863fa693ffede69cebec4a97603404d Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Thu, 22 Feb 2024 21:55:01 +0200 Subject: [PATCH] Add people picker spinner. Fix people picker add button alignment. --- Controller/GrouperGroupsController.php | 1 - Model/GrouperGroup.php | 10 +-- View/Elements/Components/subscriberList.ctp | 2 - View/GrouperGroups/base.ctp | 2 +- View/GrouperGroups/index.ctp | 91 +++++++++++---------- webroot/css/co-grouper-plugin.css | 12 +++ webroot/js/autocomplete.js | 32 ++++++-- 7 files changed, 88 insertions(+), 62 deletions(-) diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index aab184b..659496b 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -221,7 +221,6 @@ public function addSubscriber(): void public function findSubscriber(): void { - $this->autoRender = false; $this->request->allowMethod('ajax'); $this->layout = 'ajax'; diff --git a/Model/GrouperGroup.php b/Model/GrouperGroup.php index d3f891a..2b52896 100644 --- a/Model/GrouperGroup.php +++ b/Model/GrouperGroup.php @@ -217,15 +217,11 @@ public function findForPicker(int $coId, string $mode, ?string $term): array // Iterate over the email array if(!empty($emailArr) && !empty($pickerEmailType)) { - if(!empty($pickerDisplayTypes)) { - $emailLabel = _txt('fd.extended_type.generic.label', array(_txt('fd.email_address.mail'), $pickerEmailType)); - } - else { - $emailLabel = _txt('fd.email_address.mail') . ': '; - } + $emailLabel = !empty($pickerDisplayTypes) ? _txt('fd.extended_type.generic.label', array(_txt('fd.email_address.mail'), $pickerEmailType)) + : _txt('fd.email_address.mail') . ': '; foreach($emailArr as $e) { if($e['type'] == $pickerEmailType) { - $email = $e['mail'] . ' ' . $pickerDisplayTypes; + $email = $e['mail']; break; } } diff --git a/View/Elements/Components/subscriberList.ctp b/View/Elements/Components/subscriberList.ctp index 909c0ca..eb50440 100644 --- a/View/Elements/Components/subscriberList.ctp +++ b/View/Elements/Components/subscriberList.ctp @@ -1,6 +1,4 @@
- -