diff --git a/src/register/RegistrationPage.jsx b/src/register/RegistrationPage.jsx index aa890a30..26cdbab7 100644 --- a/src/register/RegistrationPage.jsx +++ b/src/register/RegistrationPage.jsx @@ -387,7 +387,7 @@ class RegistrationPage extends React.Component { { nodes } @@ -404,7 +404,7 @@ class RegistrationPage extends React.Component { key={field.name} invalid={this.state.errors[stateVar] !== ''} invalidMessage={field.errorMessages.required} - className="custom-control mb-0" + className="custom-control mb-20 small" > {beforeLink} @@ -428,7 +428,7 @@ class RegistrationPage extends React.Component { key={field.name} invalid={this.state.errors[stateVar] !== ''} invalidMessage={field.errorMessages.required} - className="mb-0" + className="mb-20" > @@ -444,7 +444,7 @@ class RegistrationPage extends React.Component { addExtraOptionalFields() { const fields = this.props.formData.fields.map((field) => { let options = null; - let cssClass = 'mb-0'; + let cssClass = 'mb-20'; if (REGISTRATION_EXTRA_FIELDS.includes(field.name)) { if (!field.required && field.name !== 'honor_code' && field.name !== 'country') { REGISTRATION_OPTIONAL_MAP[field.name] = true; @@ -506,9 +506,6 @@ class RegistrationPage extends React.Component {
-

- {intl.formatMessage(messages['create.a.new.one.here'])} -

); } else if (thirdPartyAuthApiStatus === PENDING_STATE) { @@ -572,21 +569,14 @@ class RegistrationPage extends React.Component { {intl.formatMessage(messages['already.have.an.edx.account'])} {intl.formatMessage(messages['sign.in.hyperlink'])} - {(providers.length || secondaryProviders.length || thirdPartyAuthApiStatus === PENDING_STATE) - && !currentProvider ? ( -
-

- {intl.formatMessage(messages['create.an.account.using'])} -

-
- ) :

{intl.formatMessage(messages['create.an.account'])}

} - {this.renderThirdPartyAuth(providers, secondaryProviders, currentProvider, thirdPartyAuthApiStatus, intl)} +
+

{intl.formatMessage(messages['create.a.new.account'])}

{ this.state.enableOptionalField ? this.addExtraOptionalFields() : null} + {(providers.length || secondaryProviders.length || thirdPartyAuthApiStatus === PENDING_STATE) + && !currentProvider ? ( +
+
+ + {intl.formatMessage(messages['create.an.account.using'])} + +
+ ) : {intl.formatMessage(messages['create.an.account.using'])}} + {this.renderThirdPartyAuth(providers, + secondaryProviders, + currentProvider, + thirdPartyAuthApiStatus, + intl)} diff --git a/src/register/messages.jsx b/src/register/messages.jsx index 33a80f86..c7634a67 100644 --- a/src/register/messages.jsx +++ b/src/register/messages.jsx @@ -18,13 +18,13 @@ const messages = defineMessages({ }, 'create.an.account.using': { id: 'create.an.account.using', - defaultMessage: 'Create an account using', - description: 'A message that appears before social auth buttons', + defaultMessage: 'or create an account using', + description: 'A message that after optional form fields checkbox', }, - 'create.a.new.one.here': { - id: 'create.a.new.one.here', - defaultMessage: 'or create a new one here', - description: 'Text that appears after social auth buttons and before the registration form', + 'create.a.new.account': { + id: 'create.a.new.account', + defaultMessage: 'Create a new account', + description: 'Text that appears before social auth buttons and before the registration form', }, 'register.institution.login.button': { id: 'register.institution.login.button', @@ -108,7 +108,7 @@ const messages = defineMessages({ }, 'support.education.research': { id: 'support.education.research', - defaultMessage: 'Support education research by providing additional information', + defaultMessage: 'Support education research by providing additional information. (Optional)', description: 'Text for a checkbox to ask user for if they are willing to provide extra information for education research', }, 'register.optional.label': { diff --git a/src/register/tests/RegistrationPage.test.jsx b/src/register/tests/RegistrationPage.test.jsx index f16a71fc..706324c1 100644 --- a/src/register/tests/RegistrationPage.test.jsx +++ b/src/register/tests/RegistrationPage.test.jsx @@ -317,7 +317,7 @@ describe('./RegistrationPage.js', () => { store.dispatch = jest.fn(store.dispatch); const registrationPage = mount(reduxWrapper()); - registrationPage.find('button.btn-primary').simulate('click'); + registrationPage.find('button.btn-brand').simulate('click'); expect(store.dispatch).not.toHaveBeenCalledWith(registerNewUser(formPayload)); }); diff --git a/src/register/tests/__snapshots__/RegistrationPage.test.jsx.snap b/src/register/tests/__snapshots__/RegistrationPage.test.jsx.snap index 05431c1a..9aaceae6 100644 --- a/src/register/tests/__snapshots__/RegistrationPage.test.jsx.snap +++ b/src/register/tests/__snapshots__/RegistrationPage.test.jsx.snap @@ -32,16 +32,19 @@ exports[`./RegistrationPage.js should display no password field when current pro Sign in. -

+

- Create an Account -

+ Create a new account +
+ + or create an account using +
@@ -224,52 +232,19 @@ exports[`./RegistrationPage.js should match TPA provider snapshot 1`] = ` Sign in. -
+

-

- Create an account using -

-
-
- -
-

- or create a new one here -

+ Create a new account +
+
+
+ + or create an account using + +
+
+ +
@@ -481,16 +495,19 @@ exports[`./RegistrationPage.js should match default section snapshot 1`] = ` Sign in. -

+

- Create an Account -

+ Create a new account +
+ + or create an account using +
@@ -702,16 +724,19 @@ exports[`./RegistrationPage.js should match pending button state snapshot 1`] = Sign in. -

+

- Create an Account -

+ Create a new account +
+ + or create an account using +
@@ -958,16 +988,19 @@ exports[`./RegistrationPage.js should show error message on 409 1`] = ` Sign in. -

+

- Create an Account -

+ Create a new account +
+ + or create an account using +