From c8205a12253c0342e1995d6c9d77a537e108b7a3 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Fri, 6 Jul 2018 15:51:58 -0500 Subject: [PATCH] Initial placeholders for onboard fields --- config/locales/en.yml | 48 ++++++++++++++----- javascripts/src/components/common/fields.tsx | 2 +- .../registration_page/NonprofitInfoForm.tsx | 21 +++++--- .../registration_page/RegistrationWizard.tsx | 22 ++++----- .../registration_page/UserInfoForm.tsx | 10 ++-- 5 files changed, 67 insertions(+), 36 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 1927b483..bcfdd926 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -148,22 +148,44 @@ en: nonprofit: "Nonprofit" contact: "Contact" nonprofit: - name: "Organization Name" - website: "Website URL" - email: "Org Email (public)" - phone: "Org Phone (public)" - city: "City" - state: "State" - zip: "Zip Code" + name: + label: "Organization Name" + placeholder: "Ending Poverty in the Fox Valley Inc." + website: + label: "Website URL" + placeholder: "http://www.endpovertyinthefoxvalleyinc.org" + email: + label: "Org Email (public)" + placeholder: "contact@endpovertyinthefoxvalleyinc.org" + phone: + label: "Org Phone (public)" + placeholder: "(555) 555-5555" + city: + label: "City" + placeholder: "Appleton" + state: + label: "State" + placeholder: "WI" + zip: + label: "Zip Code" + placeholder: "54915" contact: - name: "Your Name" - email: "Your Email (used for login)" - password: "New Password" - password_confirmation: "Retype Password" - phone: "Your Phone (for account recovery)" + name: + label: "Your Name" + placeholder: "Penelope Schultz" + email: + label: "Your Email (used for login)" + placeholder: "penelope@endpovertyinthefoxvalleyinc.org" + password: + label: "New Password" + password_confirmation: + label: "Retype Password" + phone: + label: "Your Phone (for account recovery)" + placeholder: "(555) 555-5555" save_and_finish: "Save & Finish" saving: "Saving..." next: "Next" footer: terms_and_privacy: "Terms & Privacy" - about: "About" \ No newline at end of file + about: "About" diff --git a/javascripts/src/components/common/fields.tsx b/javascripts/src/components/common/fields.tsx index f603e318..d5cf690b 100644 --- a/javascripts/src/components/common/fields.tsx +++ b/javascripts/src/components/common/fields.tsx @@ -14,6 +14,6 @@ export const BasicField = injectIntl(observer((props:{field:Field, intl?:Injecte inStickyError={field.hasServerError} stickyError={field.serverError} className={props.wrapperClassName} > - + })) \ No newline at end of file diff --git a/javascripts/src/components/registration_page/NonprofitInfoForm.tsx b/javascripts/src/components/registration_page/NonprofitInfoForm.tsx index 8f7ffd89..03cb577c 100644 --- a/javascripts/src/components/registration_page/NonprofitInfoForm.tsx +++ b/javascripts/src/components/registration_page/NonprofitInfoForm.tsx @@ -17,40 +17,47 @@ export interface NonprofitInfoFormProps export const FieldDefinitions : Array = [ { name: 'organization_name', - label: 'registration.wizard.nonprofit.name', + label: 'registration.wizard.nonprofit.name.label', + placeholder: 'registration.wizard.nonprofit.name.placeholder', type: 'text', validators: [Validations.isFilled] }, { name: 'website', - label: 'registration.wizard.nonprofit.website', + label: 'registration.wizard.nonprofit.website.label', + placeholder: 'registration.wizard.nonprofit.website.placeholder', validators: [Validations.optional(Validations.isUrl)] }, { name: 'org_email', - label: 'registration.wizard.nonprofit.email', + label: 'registration.wizard.nonprofit.email.label', + placeholder: 'registration.wizard.nonprofit.email.placeholder', validators: [Validations.optional(Validations.isEmail)] }, { name: 'org_phone', - label: 'registration.wizard.nonprofit.phone', + label: 'registration.wizard.nonprofit.phone.label', + placeholder: 'registration.wizard.nonprofit.phone.placeholder', type: "tel" }, { name: 'city', - label: 'registration.wizard.nonprofit.city', + label: 'registration.wizard.nonprofit.city.label', + placeholder: 'registration.wizard.nonprofit.city.placeholder', validators: [Validations.isFilled] }, { name: 'state', - label: 'registration.wizard.nonprofit.state', + label: 'registration.wizard.nonprofit.state.label', + placeholder: 'registration.wizard.nonprofit.state.placeholder', type: 'text', validators: [Validations.isFilled] }, { name: 'zip', - label: 'registration.wizard.nonprofit.zip', + label: 'registration.wizard.nonprofit.zip.label', + placeholder: 'registration.wizard.nonprofit.zip.placeholder', validators: [Validations.isFilled] } ] diff --git a/javascripts/src/components/registration_page/RegistrationWizard.tsx b/javascripts/src/components/registration_page/RegistrationWizard.tsx index bf9e05e6..79cfc388 100644 --- a/javascripts/src/components/registration_page/RegistrationWizard.tsx +++ b/javascripts/src/components/registration_page/RegistrationWizard.tsx @@ -177,17 +177,17 @@ export class InnerRegistrationWizard extends React.Component = [ { name: 'name', - label: 'registration.wizard.contact.name', + label: 'registration.wizard.contact.name.label', + placeholder: 'registration.wizard.contact.name.placeholder', validators: [Validations.isFilled] }, { name: 'email', - label: 'registration.wizard.contact.email', + label: 'registration.wizard.contact.email.label', + placeholder: 'registration.wizard.contact.email.placeholder', validators: [Validations.isEmail] }, { name: 'password', - label: 'registration.wizard.contact.password', + label: 'registration.wizard.contact.password.label', type: 'password', validators: [Validations.isFilled], related: ['userTab.password_confirmation'] }, { name: 'password_confirmation', - label: 'registration.wizard.contact.password_confirmation', + label: 'registration.wizard.contact.password_confirmation.label', type: 'password', validators: [Validations.shouldBeEqualTo("userTab.password")] }