From 7523971718cf830ab4c1071ebc425beb5c451b99 Mon Sep 17 00:00:00 2001 From: Jenni Nurmi Date: Tue, 22 Jan 2019 11:10:56 +0200 Subject: [PATCH 1/3] Add additional owners info text to PayoutDetails form --- .../PayoutDetailsForm/PayoutDetailsForm.css | 16 ++++++++++++ .../PayoutDetailsFormCompany.js | 26 ++++++++++++------- src/translations/en.json | 1 + 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/src/forms/PayoutDetailsForm/PayoutDetailsForm.css b/src/forms/PayoutDetailsForm/PayoutDetailsForm.css index 3cc8235c..a211022d 100644 --- a/src/forms/PayoutDetailsForm/PayoutDetailsForm.css +++ b/src/forms/PayoutDetailsForm/PayoutDetailsForm.css @@ -162,3 +162,19 @@ height: 18px; padding-top: 1px; } + +.additionalOwnerInfo { + @apply --marketplaceH5FontStyles; + color: var(--matterColorAnti); + margin-top: 0; + margin-bottom: 0; + padding-top: 5px; + padding-bottom: 1px; + + @media (--viewportMedium) { + margin-top: 0; + margin-bottom: 0; + padding-top: 6px; + padding-bottom: 2px; + } +} diff --git a/src/forms/PayoutDetailsForm/PayoutDetailsFormCompany.js b/src/forms/PayoutDetailsForm/PayoutDetailsFormCompany.js index 12597d58..be5f7e33 100644 --- a/src/forms/PayoutDetailsForm/PayoutDetailsFormCompany.js +++ b/src/forms/PayoutDetailsForm/PayoutDetailsFormCompany.js @@ -74,6 +74,7 @@ const PayoutDetailsFormCompanyComponent = ({ fieldRenderProps }) => { const hasMaxNumberOfAdditionalOwners = hasAdditionalOwners && values.company.additionalOwners.length >= MAX_NUMBER_OF_ADDITIONAL_OWNERS; + return ( {country ? ( @@ -174,16 +175,21 @@ const PayoutDetailsFormCompanyComponent = ({ fieldRenderProps }) => { {!hasAdditionalOwners || !hasMaxNumberOfAdditionalOwners ? ( - push('company.additionalOwners', undefined)} - > - - - - - + + push('company.additionalOwners', undefined)} + > + + + + + +

+ +

+
) : null} ) : null} diff --git a/src/translations/en.json b/src/translations/en.json index ba1d42cc..f3c9be7d 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -453,6 +453,7 @@ "PasswordResetPage.resetFailed": "Reset failed. Please try again.", "PasswordResetPage.title": "Reset password", "PayoutDetailsForm.accountTypeTitle": "Account type", + "PayoutDetailsForm.additionalOwnerInfoText": "For Hong Kong, Singapore, and Single Euro Payments Area member countries, Stripe requires information of every person that owns at least 25% of the company.", "PayoutDetailsForm.additionalOwnerLabel": "Add additional owner", "PayoutDetailsForm.additionalOwnerRemove": "Remove additional owner", "PayoutDetailsForm.addressTitle": "Address", From 7d3b2297313063ff370a7443872ca0f7890119b0 Mon Sep 17 00:00:00 2001 From: Jenni Nurmi Date: Tue, 22 Jan 2019 12:35:41 +0200 Subject: [PATCH 2/3] Add link to additional owner info text --- .../PayoutDetailsFormCompany.js | 22 +++++++++++++++++-- src/translations/en.json | 3 ++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/forms/PayoutDetailsForm/PayoutDetailsFormCompany.js b/src/forms/PayoutDetailsForm/PayoutDetailsFormCompany.js index be5f7e33..65cf73f7 100644 --- a/src/forms/PayoutDetailsForm/PayoutDetailsFormCompany.js +++ b/src/forms/PayoutDetailsForm/PayoutDetailsFormCompany.js @@ -3,7 +3,13 @@ import { bool, string } from 'prop-types'; import { compose } from 'redux'; import { FormattedMessage, injectIntl, intlShape } from 'react-intl'; import { FieldArray } from 'react-final-form-arrays'; -import { FieldTextInput, IconAdd, IconClose, InlineTextButton } from '../../components'; +import { + ExternalLink, + FieldTextInput, + IconAdd, + IconClose, + InlineTextButton, +} from '../../components'; import * as validators from '../../util/validators'; import PayoutDetailsAddress from './PayoutDetailsAddress'; @@ -75,6 +81,15 @@ const PayoutDetailsFormCompanyComponent = ({ fieldRenderProps }) => { hasAdditionalOwners && values.company.additionalOwners.length >= MAX_NUMBER_OF_ADDITIONAL_OWNERS; + const additionalOwnersInfoLink = ( + + + + ); + return ( {country ? ( @@ -187,7 +202,10 @@ const PayoutDetailsFormCompanyComponent = ({ fieldRenderProps }) => {

- +

) : null} diff --git a/src/translations/en.json b/src/translations/en.json index f3c9be7d..fbc3f83f 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -453,7 +453,8 @@ "PasswordResetPage.resetFailed": "Reset failed. Please try again.", "PasswordResetPage.title": "Reset password", "PayoutDetailsForm.accountTypeTitle": "Account type", - "PayoutDetailsForm.additionalOwnerInfoText": "For Hong Kong, Singapore, and Single Euro Payments Area member countries, Stripe requires information of every person that owns at least 25% of the company.", + "PayoutDetailsForm.additionalOwnersInfoLink": "Stripe support.", + "PayoutDetailsForm.additionalOwnerInfoText": "For Hong Kong, Singapore, and Single Euro Payments Area member countries, Stripe requires information of every person that owns at least 25% of the company. For more information, see {additionalOwnersInfoLink}", "PayoutDetailsForm.additionalOwnerLabel": "Add additional owner", "PayoutDetailsForm.additionalOwnerRemove": "Remove additional owner", "PayoutDetailsForm.addressTitle": "Address", From 01c2bcfab7940b2fdba4c1fe10425bafa2709c90 Mon Sep 17 00:00:00 2001 From: Jenni Nurmi Date: Tue, 22 Jan 2019 13:03:22 +0200 Subject: [PATCH 3/3] Edit changelog --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be3759ad..556189b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,15 @@ way to update this template, but currently, we follow a pattern: ## Upcoming version 2019-XX-XX -- [change] Default to English translation if the translation key is missing. After this update, new translation keys will not be added to other translation files with English default texts. We keep providing translations in our supported languages but they might not be up to date all the time. This means if you want to update your translations beforehand or use your own translations file, you can use [translation CLI]((https://github.com/sharetribe/flex-template-web/blob/master/docs/translations.md#managing-translations)) to check if there are translations missing. +- [add] Add info text about additional owners to `PayoutDetailsForm`. + [#1006](https://github.com/sharetribe/flex-template-web/pull/1006) +- [change] Default to English translation if the translation key is missing. After this update, new + translation keys will not be added to other translation files with English default texts. We keep + providing translations in our supported languages but they might not be up to date all the time. + This means if you want to update your translations beforehand or use your own translations file, + you can use + [translation CLI](https://github.com/sharetribe/flex-template-web/blob/master/docs/translations.md#managing-translations) + to check if there are translations missing. [#1005](https://github.com/sharetribe/flex-template-web/pull/1005) - [change] Remove `origin` parameter from `default-location-searches.js` [#1003](https://github.com/sharetribe/flex-template-web/pull/1003)