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. |
||
---|---|---|
.. | ||
assets | ||
audio/notification_sounds | ||
generated | ||
html | ||
images | ||
js | ||
shared | ||
styles | ||
templates | ||
third | ||
.gitignore |