diff --git a/Lib/lang.php b/Lib/lang.php index 22fab32..11bccc5 100644 --- a/Lib/lang.php +++ b/Lib/lang.php @@ -126,8 +126,10 @@ 'pl.grouperlite.action.close' => 'Close', 'pl.grouperlite.action.clear' => 'Clear', 'pl.grouperlite.action.add-user' => 'Add', + 'pl.grouperlite.action.act-as' => 'Act As', 'pl.grouperlite.action.remove-user' => 'Remove', - 'pl.grouperlite.action.enable-act-as' => 'Enable', + 'pl.grouperlite.action.enable' => 'Enable', + 'pl.grouperlite.action.find' => 'Find', 'pl.grouperlite.message.user-not-found-error' => 'Error: User not found.', 'pl.grouperlite.message.user-not-added-error' => 'Error: Unable to add user.', 'pl.grouperlite.message.user-not-removed-error' => 'Error: Unable to remove user.', diff --git a/View/Elements/ActAsPeopleAutocomplete.ctp b/View/Elements/ActAsPeopleAutocomplete.ctp index 46d5180..c650022 100644 --- a/View/Elements/ActAsPeopleAutocomplete.ctp +++ b/View/Elements/ActAsPeopleAutocomplete.ctp @@ -21,6 +21,9 @@ $suffix = Configure::read('debug') > 0 ? '?time=' . time() : ''; url: "= $actionUrl ?? 'null' ?>", grouperUrl: "= $grouperUrlBase ?>", view: "= $this->action ?>", + hasActAs: = (int)!empty($vv_act_as_people) ?>, + actAsPerson: = json_encode($vv_act_as_people ?? []) ?>, + permissions: = json_encode($permissions, JSON_THROW_ON_ERROR) ?>, txt: { adhocHeading: "= $vv_config['CoGrouperLiteWidget']['adhoc_heading'] ?? 'Ad-hoc groups' ?>", wgHeading: "= $vv_config['CoGrouperLiteWidget']['wg_heading'] ?? 'Working groups' ?>", diff --git a/View/Elements/ActionSideBar.ctp b/View/Elements/ActionSideBar.ctp index a4abe2d..3c8898d 100644 --- a/View/Elements/ActionSideBar.ctp +++ b/View/Elements/ActionSideBar.ctp @@ -1,2 +1,33 @@ - +
+ + diff --git a/View/GrouperGroups/index.ctp b/View/GrouperGroups/index.ctp index 00a2e3e..0dc3b5e 100644 --- a/View/GrouperGroups/index.ctp +++ b/View/GrouperGroups/index.ctp @@ -71,6 +71,9 @@ $suffix = Configure::read('debug') > 0 ? '?time=' . time() : ''; url: "= $actionUrl ?? 'null' ?>", grouperUrl: "= $grouperUrlBase ?>", view: "= $this->action ?>", + hasActAs: = (int)!empty($vv_act_as_people) ?>, + actAsPerson: = json_encode($vv_act_as_people ?? []) ?>, + permissions: = json_encode($permissions, JSON_THROW_ON_ERROR) ?>, txt: { adhocHeading: "= $vv_config['CoGrouperLiteWidget']['adhoc_heading'] ?? 'Ad-hoc groups' ?>", wgHeading: "= $vv_config['CoGrouperLiteWidget']['wg_heading'] ?? 'Working groups' ?>", @@ -124,7 +127,6 @@ $suffix = Configure::read('debug') > 0 ? '?time=' . time() : ''; JSON_THROW_ON_ERROR) ?>, }, api: { - permissions: = json_encode($permissions, JSON_THROW_ON_ERROR) ?>, co: = $vv_coid ?>, glid: = $vv_config['CoGrouperLiteWidget']['id'] ?>, mode: "= PeoplePickerModeEnum::All ?>", @@ -158,37 +160,12 @@ $suffix = Configure::read('debug') > 0 ? '?time=' . time() : '';