mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
custom_profile_fields: Add "required" parameter to the profile fields.
Fixes #28512.
This commit is contained in:
@@ -77,6 +77,7 @@ class CustomProfileField(models.Model):
|
||||
# Whether the field should be displayed in smaller summary
|
||||
# sections of a page displaying custom profile fields.
|
||||
display_in_profile_summary = models.BooleanField(default=False)
|
||||
required = models.BooleanField(default=False)
|
||||
|
||||
SHORT_TEXT = 1
|
||||
LONG_TEXT = 2
|
||||
@@ -165,6 +166,7 @@ class CustomProfileField(models.Model):
|
||||
"hint": self.hint,
|
||||
"field_data": self.field_data,
|
||||
"order": self.order,
|
||||
"required": self.required,
|
||||
}
|
||||
if self.display_in_profile_summary:
|
||||
data_as_dict["display_in_profile_summary"] = True
|
||||
|
||||
Reference in New Issue
Block a user