mirror of https://github.com/zulip/zulip.git
677b26025a
This commit refactors the code for dropdown list widget settings such that we can reuse the added functions for further settings that will use dropdown_list_widget. This change will be helpful when we will add group-based settings and change some of the existing role-based settings to be group-based. We add a new function "get_widget_for_dropdown_list_settings" to get the widget variable from setting name. The functions to get and set the setting value use "get_widget_for_dropdown_list_settings" function to get the widget and then gets or sets the setting value accordingly. We also add "data-setting-widget-type" and "data-setting-value-type" attributes to the element like other settings. The "data-setting-widget-type" attr is used by get_input_element_value to use "get_dropdown_list_widget_setting_value" function for dropdown-list-widget settings. The "data-setting-value-type" attribute is used to parse the setting value to correct types in "get_dropdown_list_widget_setting_value" function. |
||
---|---|---|
.. | ||
account_settings.hbs | ||
add_alert_word.hbs | ||
add_new_bot_form.hbs | ||
add_new_custom_profile_field_form.hbs | ||
add_user_group_modal.hbs | ||
admin_auth_methods_list.hbs | ||
admin_default_streams_list.hbs | ||
admin_emoji_list.hbs | ||
admin_export_list.hbs | ||
admin_human_form.hbs | ||
admin_invites_list.hbs | ||
admin_linkifier_edit_form.hbs | ||
admin_linkifier_list.hbs | ||
admin_playground_list.hbs | ||
admin_profile_field_list.hbs | ||
admin_realm_domains_list.hbs | ||
admin_settings_modals.hbs | ||
admin_tab.hbs | ||
admin_user_group_list.hbs | ||
admin_user_list.hbs | ||
alert_word_settings.hbs | ||
alert_word_settings_item.hbs | ||
api_key_modal.hbs | ||
attachments_settings.hbs | ||
auth_methods_settings_admin.hbs | ||
bot_avatar_row.hbs | ||
bot_list_admin.hbs | ||
bot_settings.hbs | ||
custom_user_profile_field.hbs | ||
data_exports_admin.hbs | ||
deactivated_users_admin.hbs | ||
default_streams_list_admin.hbs | ||
dev_env_email_access.hbs | ||
display_settings.hbs | ||
dropdown_list.hbs | ||
dropdown_list_widget.hbs | ||
dropdown_options_widget.hbs | ||
edit_bot_form.hbs | ||
edit_custom_profile_field_form.hbs | ||
edit_embedded_bot_service.hbs | ||
edit_outgoing_webhook_service.hbs | ||
emoji_settings_admin.hbs | ||
emoji_settings_tip.hbs | ||
image_upload_widget.hbs | ||
invites_list_admin.hbs | ||
language_selection_widget.hbs | ||
linkifier_settings_admin.hbs | ||
muted_topics_settings.hbs | ||
muted_users_settings.hbs | ||
notification_settings.hbs | ||
notification_settings_checkboxes.hbs | ||
organization_permissions_admin.hbs | ||
organization_profile_admin.hbs | ||
organization_settings_admin.hbs | ||
organization_settings_tip.hbs | ||
organization_user_settings_defaults.hbs | ||
playground_settings_admin.hbs | ||
profile_field_choice.hbs | ||
profile_field_settings_admin.hbs | ||
profile_settings.hbs | ||
realm_domains_modal.hbs | ||
settings_checkbox.hbs | ||
settings_save_discard_widget.hbs | ||
stream_specific_notification_row.hbs | ||
upgrade_tip_widget.hbs | ||
upload_space_stats.hbs | ||
uploaded_files_list.hbs | ||
user_display_settings.hbs | ||
user_groups_admin.hbs | ||
user_list_admin.hbs | ||
user_notification_settings.hbs |