dropdown_widget: Allow passing is_setting_disabled in the template.

This is a preparatory commit to allow disabling
dropdown_widget_with_label for `can_create_groups` and
`can_manage_all_groups` for non-owners.
This commit is contained in:
Shubham Padia 2024-09-17 07:39:46 +00:00 committed by Tim Abbott
parent 16389a2ab5
commit 17276e95a1
1 changed files with 1 additions and 1 deletions

View File

@ -1,4 +1,4 @@
<button id="{{widget_name}}_widget" class="dropdown-widget-button" type="button" {{#if disable_keyboard_focus}}tabindex="-1"{{/if}} name="{{widget_name}}">
<button id="{{widget_name}}_widget" class="dropdown-widget-button" type="button" {{#if is_setting_disabled}}disabled{{/if}} {{#if disable_keyboard_focus}}tabindex="-1"{{/if}} name="{{widget_name}}">
<span class="dropdown_widget_value">{{#if default_text}}{{default_text}}{{/if}}</span>
<i class="zulip-icon zulip-icon-chevron-down"></i>
</button>