Stop user groups from appearing if no groups can be added
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 27 Jul 2020 14:12:20 +0000 (16:12 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 27 Jul 2020 14:12:20 +0000 (16:12 +0200)
templates/conversationAdd.tpl

index 85c34c7c18964cc6221e0a4b3a36d990acfde3f9..cc9a1b266598c68ac92c14b039cea85aca40ef7a 100644 (file)
                UiItemListUser.init('participants', {
                        maxItems: {@$__wcf->getSession()->getPermission('user.conversation.maxParticipants')},
                        includeUserGroups: {if $__wcf->getSession()->getPermission('user.conversation.canAddGroupParticipants')}true{else}false{/if},
-                       restrictUserGroupIDs: [{implode from=$allowedUserGroupIDs item=allowedUserGroupID}{@$allowedUserGroupID}{/implode}],
+                       restrictUserGroupIDs: [-1, {implode from=$allowedUserGroupIDs item=allowedUserGroupID}{@$allowedUserGroupID}{/implode}],
                        csvPerType: true,
                        callbackSetupValues: function() {
                                return [
                UiItemListUser.init('invisibleParticipants', {
                        maxItems: {@$__wcf->getSession()->getPermission('user.conversation.maxParticipants')},
                        includeUserGroups: {if $__wcf->getSession()->getPermission('user.conversation.canAddGroupParticipants')}true{else}false{/if},
-                       restrictUserGroupIDs: [{implode from=$allowedUserGroupIDs item=allowedUserGroupID}{@$allowedUserGroupID}{/implode}],
+                       restrictUserGroupIDs: [-1, {implode from=$allowedUserGroupIDs item=allowedUserGroupID}{@$allowedUserGroupID}{/implode}],
                        csvPerType: true,
                        callbackSetupValues: function() {
                                return [