Files
zulip/web/templates/user_group_settings/user_group_permission_settings.hbs
Sahil Batra 69437c5bc8 group-settings: Refactor code to fix live update of permissions panel.
This commit refactors the code so that we can correctly update the
permissions panel when a group gains permission. The changes done are-

- Extracted templates for subsection for stream and group settings
because we might need to add complete subsection to DOM if group has
no existing permission for a particular stream or group.

- Also, updated get_group_assigned_realm_permissions to return all
subsection objects even when group has no assigned permission for
a subsection because we now have headers for all the subsection
in DOM but just hide them so that order can be maintained when
a setting of a subsection is added during live update.
2025-02-04 16:08:58 -08:00

20 lines
659 B
Handlebars

<div class="settings-subsection-parent" data-group-id="{{group_id}}">
<div class="subsection-header">
<h3>{{group_name}}</h3>
{{> ../settings/settings_save_discard_widget show_only_indicator=false }}
</div>
<div class="subsection-settings">
{{#each assigned_permissions}}
{{> ../settings/settings_checkbox
setting_name=setting_name
prefix=../id_prefix
is_checked=true
label=(lookup ../setting_labels setting_name)
is_disabled=(not can_edit)
tooltip_message=tooltip_message
}}
{{/each}}
</div>
</div>