Skip to content

Commit

Permalink
Reuse createpasswordfields component (#2235)
Browse files Browse the repository at this point in the history
* Reuse createpasswordfields component

* Add locales
after running yarn lingui:extract
  • Loading branch information
Samara Trilling authored Dec 7, 2021
1 parent 42fd53f commit 1e47000
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
15 changes: 5 additions & 10 deletions frontend/lib/laletterbuilder/letter-builder/create-account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import Page from "../../ui/page";
import { ProgressButtons } from "../../ui/buttons";
import { SessionUpdatingFormSubmitter } from "../../forms/session-updating-form-submitter";
import { CheckboxFormField, TextualFormField } from "../../forms/form-fields";
import { CheckboxFormField } from "../../forms/form-fields";
import { ModalLink } from "../../ui/modal";
import { LALetterBuilderRoutes } from "../route-info";
import { PrivacyInfoModal } from "../../ui/privacy-info-modal";
Expand All @@ -15,6 +15,7 @@ import {
BlankLALetterBuilderCreateAccountInput,
LaLetterBuilderCreateAccountMutation,
} from "../../queries/LaLetterBuilderCreateAccountMutation";
import { CreatePasswordFields } from "../../common-steps/create-password";

export const LALetterBuilderCreateAccount = LALetterBuilderOnboardingStep(
(props) => {
Expand All @@ -39,15 +40,9 @@ export const LALetterBuilderCreateAccount = LALetterBuilderOnboardingStep(
>
{(ctx) => (
<>
<TextualFormField
label={li18n._(t`Password`)}
type="password"
{...ctx.fieldPropsFor("password")}
/>
<TextualFormField
label={li18n._(t`Confirm password`)}
type="password"
{...ctx.fieldPropsFor("confirmPassword")}
<CreatePasswordFields
passwordProps={ctx.fieldPropsFor("password")}
confirmPasswordProps={ctx.fieldPropsFor("confirmPassword")}
/>
<CheckboxFormField {...ctx.fieldPropsFor("canWeSms")}>
<Trans>
Expand Down
7 changes: 1 addition & 6 deletions locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,6 @@ msgstr "Community Justice Project"
msgid "Confirm"
msgstr "Confirm"

#: frontend/lib/laletterbuilder/letter-builder/create-account.tsx:26
msgid "Confirm password"
msgstr "Confirm password"

#: frontend/lib/start-account-or-login/set-password.tsx:22
msgid "Confirm your new password"
msgstr "Confirm your new password"
Expand Down Expand Up @@ -1591,7 +1587,6 @@ msgstr "Outlets not working"
msgid "Painting overdue (3 years)"
msgstr "Painting overdue (3 years)"

#: frontend/lib/laletterbuilder/letter-builder/create-account.tsx:25
#: frontend/lib/start-account-or-login/verify-password.tsx:72
msgid "Password"
msgstr "Password"
Expand Down Expand Up @@ -1852,7 +1847,7 @@ msgid "Separate letters for each month starting in September when you couldn't p
msgstr "Separate letters for each month starting in September when you couldn't pay rent in full."

#: frontend/lib/evictionfree/declaration-builder/create-account.tsx:17
#: frontend/lib/laletterbuilder/letter-builder/create-account.tsx:16
#: frontend/lib/laletterbuilder/letter-builder/create-account.tsx:17
#: frontend/lib/norent/letter-builder/create-account.tsx:19
msgid "Set up an account"
msgstr "Set up an account"
Expand Down
7 changes: 1 addition & 6 deletions locales/es/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -485,10 +485,6 @@ msgstr "Community Justice Project"
msgid "Confirm"
msgstr "Confirmar"

#: frontend/lib/laletterbuilder/letter-builder/create-account.tsx:26
msgid "Confirm password"
msgstr ""

#: frontend/lib/start-account-or-login/set-password.tsx:22
msgid "Confirm your new password"
msgstr "Confirma tu nueva contraseña"
Expand Down Expand Up @@ -1596,7 +1592,6 @@ msgstr "Tomas de corriente no funcionan"
msgid "Painting overdue (3 years)"
msgstr "Pintura Atrasada (cada 3 años)"

#: frontend/lib/laletterbuilder/letter-builder/create-account.tsx:25
#: frontend/lib/start-account-or-login/verify-password.tsx:72
msgid "Password"
msgstr "Contraseña"
Expand Down Expand Up @@ -1857,7 +1852,7 @@ msgid "Separate letters for each month starting in September when you couldn't p
msgstr "Cartas separadas para cada mes a partir de septiembre, cuando no pudiste pagar la renta en su totalidad."

#: frontend/lib/evictionfree/declaration-builder/create-account.tsx:17
#: frontend/lib/laletterbuilder/letter-builder/create-account.tsx:16
#: frontend/lib/laletterbuilder/letter-builder/create-account.tsx:17
#: frontend/lib/norent/letter-builder/create-account.tsx:19
msgid "Set up an account"
msgstr "Configura tu cuenta"
Expand Down

0 comments on commit 1e47000

Please sign in to comment.