diff --git a/src/authn-component/index.jsx b/src/authn-component/index.jsx index ac9bfd73..14506dd6 100644 --- a/src/authn-component/index.jsx +++ b/src/authn-component/index.jsx @@ -1,9 +1,12 @@ import React from 'react'; +import { useIntl } from '@edx/frontend-platform/i18n'; import PropTypes from 'prop-types'; +import messages from './messages'; import BaseContainer from '../base-container'; import { LoginForm } from '../forms'; +import RegistrationForm from '../forms/registration-popup'; /** * Main component that holds the logic for conditionally rendering login or registration form. @@ -14,13 +17,17 @@ import { LoginForm } from '../forms'; * @returns {JSX.Element} The rendered BaseContainer component containing either login or registration form. */ -const AuthnComponent = ({ - open, setOpen, -}) => ( - - - -); +const AuthnComponent = ({ open, setOpen }) => { + const { formatMessage } = useIntl(); + const registrationFooterText = formatMessage(messages.footerText); + + return ( + + + + + ); +}; AuthnComponent.propTypes = { open: PropTypes.bool.isRequired, diff --git a/src/authn-component/messages.jsx b/src/authn-component/messages.jsx new file mode 100644 index 00000000..60fb0f7f --- /dev/null +++ b/src/authn-component/messages.jsx @@ -0,0 +1,11 @@ +import { defineMessages } from '@edx/frontend-platform/i18n'; + +const messages = defineMessages({ + footerText: { + id: 'footer.text', + defaultMessage: 'By creating an account, you agree to the Terms of Service and Honor Code and you acknowledge that edX and each Member process your personal data in accordance with the Privacy Policy.', + description: 'Text that appears on registration form stating honor code and privacy policy', + }, +}); + +export default messages; diff --git a/src/base-container/index.jsx b/src/base-container/index.jsx index 5bd3d425..6cfe66d4 100644 --- a/src/base-container/index.jsx +++ b/src/base-container/index.jsx @@ -39,7 +39,7 @@ const BaseContainer = ({ {footerText && ( -

{footerText}

+

{footerText}

)} diff --git a/src/forms/login/messages.js b/src/forms/login/messages.js index 4e42f910..c30a399e 100644 --- a/src/forms/login/messages.js +++ b/src/forms/login/messages.js @@ -27,17 +27,17 @@ const messages = defineMessages({ description: 'Text that appears on the registration button', }, loginFormEmailFieldLabel: { - id: 'login.form.email.field.text', + id: 'login.form.email.field.label', defaultMessage: 'Email', description: 'Email field label', }, loginFormPasswordFieldLabel: { - id: 'login.form.password.field.text', + id: 'login.form.password.field.label', defaultMessage: 'Password', description: 'Password field label', }, loginFormHeading2: { - id: 'login.form.or.message', + id: 'login.form.heading.2', defaultMessage: 'or', description: 'Heading that appears between social auth and basic login form', }, diff --git a/src/forms/registration-popup/index.jsx b/src/forms/registration-popup/index.jsx new file mode 100644 index 00000000..d853fc29 --- /dev/null +++ b/src/forms/registration-popup/index.jsx @@ -0,0 +1,87 @@ +import React from 'react'; + +import { useIntl } from '@edx/frontend-platform/i18n'; +import { + Button, Container, Form, Hyperlink, Icon, +} from '@openedx/paragon'; +import { CheckCircleOutline, RemoveRedEye } from '@openedx/paragon/icons'; + +import messages from './messages'; +import SocialAuthButtons from '../../common-ui/SocialAuthButtons'; +import './index.scss'; + +const RegistrationForm = () => { + const { formatMessage } = useIntl(); + return ( + +

{formatMessage(messages.registrationFormHeading1)}

+
+
+ + + +
+ Lorem ipsum dolor sit amet +
+ Lorem ipsum dolor sit amet consectetur. Morbi etiam mauris enim est morbi aliquet ipsum iaculis +
+
+ +
+ {formatMessage(messages.registrationFormHeading2)} +
+
+ + + + + + + + + + + + + } + floatingLabel={formatMessage(messages.registrationFormPasswordFieldLabel)} + /> + + + + {formatMessage(messages.registrationFormOptOutLabel)} + +
+ +
+
+
+ + {formatMessage(messages.registrationFormAlreadyHaveAccountText)} + + {formatMessage(messages.registrationFormSignInLink)} + + +
+ + {formatMessage(messages.registrationFormSchoolOrOrganizationLink)} + + {formatMessage(messages.registrationFormSignInWithCredentialsLink)} + + +
+
+ ); +}; + +export default RegistrationForm; diff --git a/src/forms/registration-popup/index.scss b/src/forms/registration-popup/index.scss new file mode 100644 index 00000000..bac0c8a9 --- /dev/null +++ b/src/forms/registration-popup/index.scss @@ -0,0 +1,15 @@ +@import "~@edx/brand/paragon/variables"; + +.registration-form { + padding: 3.5rem 2.5rem; +} + +.separator { + border: 0; + border-top: 0.075rem solid $light-500 +} + +.pgn__form-control-floating-label-text:after { + content:"*"; + color: $danger-500; +} diff --git a/src/forms/registration-popup/messages.jsx b/src/forms/registration-popup/messages.jsx new file mode 100644 index 00000000..837fcef2 --- /dev/null +++ b/src/forms/registration-popup/messages.jsx @@ -0,0 +1,61 @@ +import { defineMessages } from '@edx/frontend-platform/i18n'; + +const messages = defineMessages({ + registrationFormHeading1: { + id: 'registration.form.heading.1', + defaultMessage: 'Create account', + description: 'registration form main heading', + }, + registrationFormHeading2: { + id: 'registration.form.or.heading.2', + defaultMessage: 'or', + description: 'Heading that appears between social auth and basic registration form', + }, + registrationFormEmailFieldLabel: { + id: 'registration.form.email.label', + defaultMessage: 'Email', + description: 'Label for email input field', + }, + registrationFormFullNameFieldLabel: { + id: 'registration.form.full.name.label', + defaultMessage: 'Full Name', + description: 'Label for full name input field', + }, + registrationFormPasswordFieldLabel: { + id: 'registration.form.password.label', + defaultMessage: 'Password', + description: 'Label for password input field', + }, + registrationFormOptOutLabel: { + id: 'registration.Form.opt.out.label', + defaultMessage: 'I don’t want to receive marketing messages from edX', + description: 'Label marketing email opt out option on registration form', + }, + registrationFormCreateAccountButton: { + id: 'registration.form.continue.button', + defaultMessage: 'Create an account for free', + description: 'Text for submit button on registration form', + }, + registrationFormAlreadyHaveAccountText: { + id: 'registration.form.already.have.account.text', + defaultMessage: 'Already have an account?', + description: 'Login button help text', + }, + registrationFormSignInLink: { + id: 'registration.form.sign.in.link', + defaultMessage: 'Sign In', + description: 'Text for sign in link', + }, + registrationFormSchoolOrOrganizationLink: { + id: 'registration.form.account.school.organization.text', + defaultMessage: 'Have an account through school or organization?', + description: 'Label for link that leads learners to the institution login page', + }, + registrationFormSignInWithCredentialsLink: { + id: 'registration.form.sign.in.with.credentials.link', + defaultMessage: 'Sign in with your credentials', + description: 'Text for signing in with credentials', + }, +}); + +export default messages;