mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
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.
20 lines
659 B
Handlebars
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>
|