mirror of https://github.com/zulip/zulip.git
settings: Rename four custom profile fields types.
This commit renames four custom profile fields types. Fixes part of #28511.
This commit is contained in:
parent
abe6e5b807
commit
9917ffa220
|
@ -45,17 +45,17 @@ methods][authentication-production] documentation for details.
|
|||
|
||||
There are several different types of fields available.
|
||||
|
||||
* **Short text**: For one line responses, like
|
||||
* **Text (short)**: For one line responses, like
|
||||
"Job title". Responses are limited to 50 characters.
|
||||
* **Long text**: For multiline responses, like "Biography".
|
||||
* **Date picker**: For dates, like "Birthday".
|
||||
* **Text (long)**: For multiline responses, like "Biography".
|
||||
* **Date**: For dates, like "Birthday".
|
||||
* **Link**: For links to websites.
|
||||
* **External account**: For linking to GitHub, Twitter, etc.
|
||||
* **Pronouns**: What pronouns should people use to refer to the user? Pronouns
|
||||
are displayed in [user mention](/help/mention-a-user-or-group) autocomplete
|
||||
suggestions.
|
||||
* **List of options**: Creates a dropdown with a list of options.
|
||||
* **Person picker**: For selecting one or more users, like "Manager" or
|
||||
* **Users**: For selecting one or more users, like "Manager" or
|
||||
"Direct reports".
|
||||
|
||||
## Display custom fields on user card
|
||||
|
|
|
@ -31,7 +31,7 @@ async function test_add_new_profile_field(page: Page): Promise<void> {
|
|||
);
|
||||
assert.strictEqual(
|
||||
await common.get_text_from_selector(page, `${profile_field_row} span.profile_field_type`),
|
||||
"Short text",
|
||||
"Text (short)",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ async function test_edit_profile_field(page: Page): Promise<void> {
|
|||
);
|
||||
assert.strictEqual(
|
||||
await common.get_text_from_selector(page, `${profile_field_row} span.profile_field_type`),
|
||||
"Short text",
|
||||
"Text (short)",
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,14 +14,14 @@ class Migration(migrations.Migration):
|
|||
name="field_type",
|
||||
field=models.PositiveSmallIntegerField(
|
||||
choices=[
|
||||
(1, "Short text"),
|
||||
(2, "Long text"),
|
||||
(4, "Date picker"),
|
||||
(1, "Text (short)"),
|
||||
(2, "Text (long)"),
|
||||
(4, "Date"),
|
||||
(5, "Link"),
|
||||
(7, "External account"),
|
||||
(8, "Pronouns"),
|
||||
(3, "List of options"),
|
||||
(6, "Person picker"),
|
||||
(6, "Users"),
|
||||
],
|
||||
default=1,
|
||||
),
|
||||
|
|
|
@ -94,7 +94,7 @@ class CustomProfileField(models.Model):
|
|||
(SELECT, gettext_lazy("List of options"), validate_select_field, str, "SELECT"),
|
||||
]
|
||||
USER_FIELD_TYPE_DATA: List[UserFieldElement] = [
|
||||
(USER, gettext_lazy("Person picker"), check_valid_user_ids, orjson.loads, "USER"),
|
||||
(USER, gettext_lazy("Users"), check_valid_user_ids, orjson.loads, "USER"),
|
||||
]
|
||||
|
||||
SELECT_FIELD_VALIDATORS: Dict[int, ExtendedValidator] = {
|
||||
|
@ -106,9 +106,9 @@ class CustomProfileField(models.Model):
|
|||
|
||||
FIELD_TYPE_DATA: List[FieldElement] = [
|
||||
# Type, display name, validator, converter, keyword
|
||||
(SHORT_TEXT, gettext_lazy("Short text"), check_short_string, str, "SHORT_TEXT"),
|
||||
(LONG_TEXT, gettext_lazy("Long text"), check_long_string, str, "LONG_TEXT"),
|
||||
(DATE, gettext_lazy("Date picker"), check_date, str, "DATE"),
|
||||
(SHORT_TEXT, gettext_lazy("Text (short)"), check_short_string, str, "SHORT_TEXT"),
|
||||
(LONG_TEXT, gettext_lazy("Text (long)"), check_long_string, str, "LONG_TEXT"),
|
||||
(DATE, gettext_lazy("Date"), check_date, str, "DATE"),
|
||||
(URL, gettext_lazy("Link"), check_url, str, "URL"),
|
||||
(
|
||||
EXTERNAL_ACCOUNT,
|
||||
|
|
Loading…
Reference in New Issue