mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	custom_profile_fields: Add "display_in_profile_summary" field in model.
To allow `custom_profile_field` to display in user profile popover, added new boolean field "display_in_profile_summary" in its model class. In `custom_profile_fields.py`, functions are edited as per conditions, like currently we can display max 2 `custom_profile_fields` except `LONG_TEXT` and `USER` type fields. Default external account custom profile fields made updatable for only this new field, as previous they were not updatable. Fixes part of: #21215
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							2e9cd20380
						
					
				
				
					commit
					543f36b7da
				
			@@ -171,6 +171,9 @@ custom_profile_field_type = DictType(
 | 
			
		||||
        ("field_data", str),
 | 
			
		||||
        ("order", int),
 | 
			
		||||
    ],
 | 
			
		||||
    optional_keys=[
 | 
			
		||||
        ("display_in_profile_summary", bool),
 | 
			
		||||
    ],
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
custom_profile_fields_event = event_dict_type(
 | 
			
		||||
 
 | 
			
		||||
@@ -29,11 +29,12 @@ RealmUserValidator = Callable[[int, object, bool], List[int]]
 | 
			
		||||
ProfileDataElementValue = Union[str, List[int]]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class ProfileDataElementBase(TypedDict):
 | 
			
		||||
class ProfileDataElementBase(TypedDict, total=False):
 | 
			
		||||
    id: int
 | 
			
		||||
    name: str
 | 
			
		||||
    type: int
 | 
			
		||||
    hint: str
 | 
			
		||||
    display_in_profile_summary: bool
 | 
			
		||||
    field_data: str
 | 
			
		||||
    order: int
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user