mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	org settings: Move disable attribute to admin_auth_methods_list.
				
					
				
			This commits disables the auth-methods table using the disabled attribute in admin_auth_methods_list handlebars instead of doing that in settings_org.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							75fc19acfd
						
					
				
				
					commit
					2277ee0c90
				
			@@ -289,13 +289,12 @@ exports.populate_auth_methods = function (auth_methods) {
 | 
				
			|||||||
            method: {
 | 
					            method: {
 | 
				
			||||||
                method: key,
 | 
					                method: key,
 | 
				
			||||||
                enabled: auth_methods[key],
 | 
					                enabled: auth_methods[key],
 | 
				
			||||||
 | 
					                is_admin: page_params.is_admin,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
        }));
 | 
					        }));
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    loading.destroy_indicator($('#admin_page_auth_methods_loading_indicator'));
 | 
					    loading.destroy_indicator($('#admin_page_auth_methods_loading_indicator'));
 | 
				
			||||||
    if (!page_params.is_admin) {
 | 
					    if (!page_params.is_admin) {
 | 
				
			||||||
        $(".organization-box [data-name='auth-methods']")
 | 
					 | 
				
			||||||
            .find("input, button, select, checked").attr("disabled", true);
 | 
					 | 
				
			||||||
        var tip_box = $("<div class='tip'></div>")
 | 
					        var tip_box = $("<div class='tip'></div>")
 | 
				
			||||||
            .text(i18n.t("Only organization administrators can edit these settings."));
 | 
					            .text(i18n.t("Only organization administrators can edit these settings."));
 | 
				
			||||||
        // Don't prepend a tip to custom emoji settings page. We handle it separately.
 | 
					        // Don't prepend a tip to custom emoji settings page. We handle it separately.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,7 @@
 | 
				
			|||||||
    </td>
 | 
					    </td>
 | 
				
			||||||
    <td>
 | 
					    <td>
 | 
				
			||||||
        <label class="checkbox">
 | 
					        <label class="checkbox">
 | 
				
			||||||
            <input type="checkbox" {{#if enabled}}checked="checked"{{/if}} />
 | 
					            <input type="checkbox" {{#if enabled}}checked="checked"{{/if}} {{#unless is_admin}}disabled{{/unless}}/>
 | 
				
			||||||
            <span></span>
 | 
					            <span></span>
 | 
				
			||||||
        </label>
 | 
					        </label>
 | 
				
			||||||
    </td>
 | 
					    </td>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user