mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	settings: Fix code for special case of theme settings subsection.
We handle "Theme settings" subsection separately in
get_subsection_property_elements as it contains unique
radio-button structure for emojiset setting.
This should have been fixed while reorganizing the section
to have color scheme and emoji related settings under same
subsection in adb612a0b4.
Fixes #20644.
			
			
This commit is contained in:
		@@ -215,12 +215,13 @@ export function extract_property_name(elem, for_realm_default_settings) {
 | 
			
		||||
 | 
			
		||||
function get_subsection_property_elements(element) {
 | 
			
		||||
    const subsection = $(element).closest(".org-subsection-parent");
 | 
			
		||||
    if (subsection.hasClass("emoji-settings")) {
 | 
			
		||||
    if (subsection.hasClass("theme-settings")) {
 | 
			
		||||
        // Because the emojiset widget has a unique radio button
 | 
			
		||||
        // structure, it needs custom code.
 | 
			
		||||
        const color_scheme_elem = subsection.find(".setting_color_scheme");
 | 
			
		||||
        const emojiset_elem = subsection.find("input[name='emojiset']:checked");
 | 
			
		||||
        const translate_emoticons_elem = subsection.find(".translate_emoticons");
 | 
			
		||||
        return [emojiset_elem, translate_emoticons_elem];
 | 
			
		||||
        return [color_scheme_elem, emojiset_elem, translate_emoticons_elem];
 | 
			
		||||
    }
 | 
			
		||||
    return Array.from(subsection.find(".prop-element"));
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user