From b7633d0b9434560d867ebd858b440c4367a1808d Mon Sep 17 00:00:00 2001 From: Manjinder Singh <49171515+jinder1s@users.noreply.github.com> Date: Fri, 17 Apr 2020 13:50:21 -0400 Subject: [PATCH] [CR-2057]: Remove email placeholder (#23739) * Remove email placeholder The current placeholder is confusing to users and results in many trying to login with their username. The change in this PR hopefully decreases that confusion. According to UX recommendations, we have decided to remove the email placeholder for the form. It seems placeholders tend to just confuse the users. --- openedx/core/djangoapps/user_authn/views/login_form.py | 9 ++------- .../core/djangoapps/user_authn/views/tests/test_login.py | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/openedx/core/djangoapps/user_authn/views/login_form.py b/openedx/core/djangoapps/user_authn/views/login_form.py index 68370f112d..0d850eae30 100644 --- a/openedx/core/djangoapps/user_authn/views/login_form.py +++ b/openedx/core/djangoapps/user_authn/views/login_form.py @@ -89,15 +89,11 @@ def get_login_session_form(request): # Translators: This label appears above a field on the login form # meant to hold the user's email address. - email_label = _(u"Email") - - # Translators: This example email address is used as a placeholder in - # a field on the login form meant to hold the user's email address. - email_placeholder = _(u"username@domain.com") + email_label = _("Email") # Translators: These instructions appear on the login form, immediately # below a field meant to hold the user's email address. - email_instructions = _(u"The email address you used to register with {platform_name}").format( + email_instructions = _("The email address you used to register with {platform_name}").format( platform_name=configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME) ) @@ -105,7 +101,6 @@ def get_login_session_form(request): "email", field_type="email", label=email_label, - placeholder=email_placeholder, instructions=email_instructions, restrictions={ "min_length": accounts.EMAIL_MIN_LENGTH, diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_login.py b/openedx/core/djangoapps/user_authn/views/tests/test_login.py index 8b323b941c..5948ad86ca 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_login.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_login.py @@ -811,8 +811,8 @@ class LoginSessionViewTest(ApiTestCase): "type": "email", "required": True, "label": "Email", - "placeholder": "username@domain.com", - "instructions": u"The email address you used to register with {platform_name}".format( + "placeholder": "", + "instructions": "The email address you used to register with {platform_name}".format( platform_name=settings.PLATFORM_NAME ), "restrictions": {