mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	custom fields: Set generic click handler on remove_date buttons.
This commit adds click handler on date type custom profile fields on field initialization itself. This commit also fixes the bug in date type fields in user profile in org settings.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							b93ca2fc50
						
					
				
				
					commit
					865a7204f9
				
			@@ -162,6 +162,10 @@ exports.initialize_custom_date_type_fields = function (element_id) {
 | 
			
		||||
            $(this).parent().find(".remove_date").show();
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    $(element_id).find(".custom_user_field .remove_date").on("click", function () {
 | 
			
		||||
        $(this).parent().find(".custom_user_field_value").val("");
 | 
			
		||||
    });
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.initialize_custom_user_type_fields = function (element_id, user_id, is_editable,
 | 
			
		||||
@@ -464,7 +468,6 @@ exports.set_up = function () {
 | 
			
		||||
        e.stopPropagation();
 | 
			
		||||
        var field = $(e.target).closest('.custom_user_field').expectOne();
 | 
			
		||||
        var field_id = parseInt($(field).attr("data-field-id"), 10);
 | 
			
		||||
        field.find(".custom_user_field_value").val("");
 | 
			
		||||
        update_user_custom_profile_fields([field_id], channel.del);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user