mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	settings: Restrict opening full name and email change overlay modal.
Set condition before opening full name and email change overlay modal, to check whether changing full name or email is allowed in realm.
This commit is contained in:
		@@ -104,7 +104,9 @@ exports.set_up = function () {
 | 
			
		||||
    $("#change_full_name").on('click', function (e) {
 | 
			
		||||
        e.preventDefault();
 | 
			
		||||
        e.stopPropagation();
 | 
			
		||||
        if (!page_params.realm_name_changes_disabled) {
 | 
			
		||||
            overlays.open_modal('change_full_name_modal');
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $('#change_password').on('click', function (e) {
 | 
			
		||||
@@ -243,9 +245,11 @@ exports.set_up = function () {
 | 
			
		||||
    $('#change_email').on('click', function (e) {
 | 
			
		||||
        e.preventDefault();
 | 
			
		||||
        e.stopPropagation();
 | 
			
		||||
        if (!page_params.realm_email_changes_disabled) {
 | 
			
		||||
            overlays.open_modal('change_email_modal');
 | 
			
		||||
            var email = $('#email_value').text().trim();
 | 
			
		||||
            $('.email_change_container').find("input[name='email']").val(email);
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $("#user_deactivate_account_button").on('click', function (e) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user