Merge pull request #14985 from open-craft/jill/update-registration-login
ENT-332/ENT-333 Updates Register and Login as per new design
This commit is contained in:
@@ -822,6 +822,7 @@ class RegistrationViewTest(ThirdPartyAuthTestMixin, UserAPITestCase):
|
||||
u"required": True,
|
||||
u"label": u"Email",
|
||||
u"placeholder": u"username@domain.com",
|
||||
u"instructions": u"This is what you will use to login.",
|
||||
u"restrictions": {
|
||||
"min_length": EMAIL_MIN_LENGTH,
|
||||
"max_length": EMAIL_MAX_LENGTH
|
||||
@@ -835,9 +836,9 @@ class RegistrationViewTest(ThirdPartyAuthTestMixin, UserAPITestCase):
|
||||
u"name": u"name",
|
||||
u"type": u"text",
|
||||
u"required": True,
|
||||
u"label": u"Full name",
|
||||
u"placeholder": u"Jane Doe",
|
||||
u"instructions": u"Your legal name, used for any certificates you earn.",
|
||||
u"label": u"Full Name",
|
||||
u"placeholder": u"Jane Q. Learner",
|
||||
u"instructions": u"This name will be used on any certificates that you earn.",
|
||||
u"restrictions": {
|
||||
"max_length": 255
|
||||
},
|
||||
@@ -850,9 +851,10 @@ class RegistrationViewTest(ThirdPartyAuthTestMixin, UserAPITestCase):
|
||||
u"name": u"username",
|
||||
u"type": u"text",
|
||||
u"required": True,
|
||||
u"label": u"Public username",
|
||||
u"placeholder": u"JaneDoe",
|
||||
u"instructions": u"The name that will identify you in your courses - <strong>(cannot be changed later)</strong>", # pylint: disable=line-too-long
|
||||
u"label": u"Public Username",
|
||||
u"placeholder": u"Jane_Q_Learner",
|
||||
u"instructions": u"The name that will identify you in your courses. "
|
||||
u"It cannot be changed later.",
|
||||
u"restrictions": {
|
||||
"min_length": USERNAME_MIN_LENGTH,
|
||||
"max_length": USERNAME_MAX_LENGTH
|
||||
@@ -890,6 +892,7 @@ class RegistrationViewTest(ThirdPartyAuthTestMixin, UserAPITestCase):
|
||||
u"required": True,
|
||||
u"label": u"Email",
|
||||
u"placeholder": u"username@domain.com",
|
||||
u"instructions": u"This is what you will use to login.",
|
||||
u"restrictions": {
|
||||
"min_length": EMAIL_MIN_LENGTH,
|
||||
"max_length": EMAIL_MAX_LENGTH
|
||||
@@ -973,6 +976,7 @@ class RegistrationViewTest(ThirdPartyAuthTestMixin, UserAPITestCase):
|
||||
u"required": True,
|
||||
u"label": u"Email",
|
||||
u"placeholder": u"username@domain.com",
|
||||
u"instructions": u"This is what you will use to login.",
|
||||
u"restrictions": {
|
||||
"min_length": EMAIL_MIN_LENGTH,
|
||||
"max_length": EMAIL_MAX_LENGTH
|
||||
@@ -980,7 +984,7 @@ class RegistrationViewTest(ThirdPartyAuthTestMixin, UserAPITestCase):
|
||||
}
|
||||
)
|
||||
|
||||
# Full name should be filled in
|
||||
# Full Name should be filled in
|
||||
self._assert_reg_field(
|
||||
no_extra_fields_setting,
|
||||
{
|
||||
@@ -988,9 +992,9 @@ class RegistrationViewTest(ThirdPartyAuthTestMixin, UserAPITestCase):
|
||||
u"defaultValue": u"Bob",
|
||||
u"type": u"text",
|
||||
u"required": True,
|
||||
u"label": u"Full name",
|
||||
u"placeholder": u"Jane Doe",
|
||||
u"instructions": u"Your legal name, used for any certificates you earn.",
|
||||
u"label": u"Full Name",
|
||||
u"placeholder": u"Jane Q. Learner",
|
||||
u"instructions": u"This name will be used on any certificates that you earn.",
|
||||
u"restrictions": {
|
||||
"max_length": NAME_MAX_LENGTH,
|
||||
}
|
||||
@@ -1005,9 +1009,10 @@ class RegistrationViewTest(ThirdPartyAuthTestMixin, UserAPITestCase):
|
||||
u"defaultValue": u"Bob123",
|
||||
u"type": u"text",
|
||||
u"required": True,
|
||||
u"label": u"Public username",
|
||||
u"placeholder": u"JaneDoe",
|
||||
u"instructions": u"The name that will identify you in your courses - <strong>(cannot be changed later)</strong>", # pylint: disable=line-too-long
|
||||
u"label": u"Public Username",
|
||||
u"placeholder": u"Jane_Q_Learner",
|
||||
u"instructions": u"The name that will identify you in your courses. "
|
||||
u"It cannot be changed later.",
|
||||
u"restrictions": {
|
||||
"min_length": USERNAME_MIN_LENGTH,
|
||||
"max_length": USERNAME_MAX_LENGTH
|
||||
@@ -1197,7 +1202,7 @@ class RegistrationViewTest(ThirdPartyAuthTestMixin, UserAPITestCase):
|
||||
"required": True,
|
||||
"label": "Confirm Email",
|
||||
"errorMessages": {
|
||||
"required": "Please confirm your email.",
|
||||
"required": "Please confirm your email address.",
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -396,11 +396,16 @@ class RegistrationView(APIView):
|
||||
# a field on the registration form meant to hold the user's email address.
|
||||
email_placeholder = _(u"username@domain.com")
|
||||
|
||||
# Translators: These instructions appear on the registration form, immediately
|
||||
# below a field meant to hold the user's email address.
|
||||
email_instructions = _(u"This is what you will use to login.")
|
||||
|
||||
form_desc.add_field(
|
||||
"email",
|
||||
field_type="email",
|
||||
label=email_label,
|
||||
placeholder=email_placeholder,
|
||||
instructions=email_instructions,
|
||||
restrictions={
|
||||
"min_length": EMAIL_MIN_LENGTH,
|
||||
"max_length": EMAIL_MAX_LENGTH,
|
||||
@@ -421,7 +426,7 @@ class RegistrationView(APIView):
|
||||
# Translators: This label appears above a field on the registration form
|
||||
# meant to confirm the user's email address.
|
||||
email_label = _(u"Confirm Email")
|
||||
error_msg = _(u"Please confirm your email.")
|
||||
error_msg = _(u"Please confirm your email address.")
|
||||
|
||||
form_desc.add_field(
|
||||
"confirm_email",
|
||||
@@ -444,15 +449,15 @@ class RegistrationView(APIView):
|
||||
"""
|
||||
# Translators: This label appears above a field on the registration form
|
||||
# meant to hold the user's full name.
|
||||
name_label = _(u"Full name")
|
||||
name_label = _(u"Full Name")
|
||||
|
||||
# Translators: This example name is used as a placeholder in
|
||||
# a field on the registration form meant to hold the user's name.
|
||||
name_placeholder = _(u"Jane Doe")
|
||||
name_placeholder = _(u"Jane Q. Learner")
|
||||
|
||||
# Translators: These instructions appear on the registration form, immediately
|
||||
# below a field meant to hold the user's full name.
|
||||
name_instructions = _(u"Your legal name, used for any certificates you earn.")
|
||||
name_instructions = _(u"This name will be used on any certificates that you earn.")
|
||||
|
||||
form_desc.add_field(
|
||||
"name",
|
||||
@@ -477,18 +482,18 @@ class RegistrationView(APIView):
|
||||
"""
|
||||
# Translators: This label appears above a field on the registration form
|
||||
# meant to hold the user's public username.
|
||||
username_label = _(u"Public username")
|
||||
username_label = _(u"Public Username")
|
||||
|
||||
username_instructions = _(
|
||||
# Translators: These instructions appear on the registration form, immediately
|
||||
# below a field meant to hold the user's public username.
|
||||
u"The name that will identify you in your courses - "
|
||||
u"{bold_start}(cannot be changed later){bold_end}"
|
||||
).format(bold_start=u'<strong>', bold_end=u'</strong>')
|
||||
u"The name that will identify you in your courses. "
|
||||
u"It cannot be changed later."
|
||||
)
|
||||
|
||||
# Translators: This example username is used as a placeholder in
|
||||
# a field on the registration form meant to hold the user's username.
|
||||
username_placeholder = _(u"JaneDoe")
|
||||
username_placeholder = _(u"Jane_Q_Learner")
|
||||
|
||||
form_desc.add_field(
|
||||
"username",
|
||||
|
||||
Reference in New Issue
Block a user