Files
zulip/web/templates/user_group_settings/cannot_deactivate_group_banner.hbs
Sahil Batra 7b66eb838e groups-ui: Update error shown when group cannot be deactivated.
This commit updates error banner shown when group is only used
as subgroups and not as permission.

If group is used as a permission, then we mention that in the
error banner and have a button to go to "Permissions" panel.
We show the same banner even when group is used as a subgroup
as well. But when group is only used as subgroups, we just
show a message containing names of all the supergroups.
2025-07-15 11:57:42 -07:00

23 lines
1002 B
Handlebars

<div class="cannot-deactivate-group-banner main-view-banner error">
<p class="banner-text">
{{#if group_used_for_permissions}}
{{t "To deactivate this group, you must first remove all permissions assigned to it."}}
{{else}}
{{#tr}}
To deactivate this group, you must first remove it from all other groups. This group is currently a subgroup of: <z-supergroup-names></z-supergroup-names>.
{{#*inline "z-supergroup-names"}}
{{#each supergroups}}
<a class="view-group-members" data-group-id="{{group_id}}" href="{{settings_url}}">{{group_name}}</a>
{{~#unless @last}}, {{/unless~}}
{{/each}}
{{/inline}}
{{/tr}}
{{/if}}
</p>
{{#if group_used_for_permissions}}
<button class="permissions-button main-view-banner-action-button">
{{t "View permissions"}}
</button>
{{/if}}
</div>