Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show ToS error in connect manual bank account page #7978

Merged
merged 3 commits into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default {
genericErrorMessage: 'Oops... something went wrong and your request could not be completed. Please try again later.',
error: {
invalidAmount: 'Invalid amount',
acceptedTerms: 'You must accept the Terms of Service to continue',
},
please: 'Please',
contactUs: 'contact us',
Expand Down Expand Up @@ -348,7 +349,6 @@ export default {
addressStreet: 'Please enter a valid billing address that is not a PO Box',
addressState: 'Please select a state',
addressCity: 'Please enter a city',
acceptedTerms: 'You must accept the Terms of Service to continue',
genericFailureMessage: 'An error occurred while adding your card, please try again',
password: 'Please enter your Expensify password',
},
Expand Down Expand Up @@ -574,7 +574,6 @@ export default {
agreeToThe: 'I agree to the',
walletAgreement: 'Wallet agreement',
enablePayments: 'Enable payments',
termsMustBeAccepted: 'Terms must be accepted',
feeAmountZero: '$0',
monthlyFee: 'Monthly fee',
inactivity: 'Inactivity',
Expand Down Expand Up @@ -701,7 +700,6 @@ export default {
termsAndConditions: 'terms and conditions',
certifyTrueAndAccurate: 'I certify that the information provided is true and accurate',
error: {
termsAndConditions: 'Must accept terms and conditions',
certify: 'Must certify information is true and accurate',
},
},
Expand Down
4 changes: 1 addition & 3 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default {
genericErrorMessage: 'Ups... algo no ha ido bien y la acción no se ha podido completar. Por favor inténtalo más tarde.',
error: {
invalidAmount: 'Monto no válido',
acceptedTerms: 'Debes aceptar los Términos de servicio para continuar',
},
please: 'Por favor',
contactUs: 'contáctenos',
Expand Down Expand Up @@ -348,7 +349,6 @@ export default {
addressStreet: 'Ingrese una dirección de facturación válida que no sea un apartado postal',
addressState: 'Por favor seleccione un estado',
addressCity: 'Por favor ingrese una ciudad',
acceptedTerms: 'Debes aceptar los Términos de servicio para continuar',
genericFailureMessage: 'Se produjo un error al agregar su tarjeta. Vuelva a intentarlo',
password: 'Por favor ingrese tu contraseña de Expensify',
},
Expand Down Expand Up @@ -574,7 +574,6 @@ export default {
agreeToThe: 'Estoy de acuerdo con la ',
walletAgreement: 'Acuerdo de billetera',
enablePayments: 'Habilitar pagos',
termsMustBeAccepted: 'Se deben aceptar los términos',
feeAmountZero: '$0',
monthlyFee: 'Cuota mensual',
inactivity: 'Inactividad',
Expand Down Expand Up @@ -703,7 +702,6 @@ export default {
termsAndConditions: 'Términos y condiciones',
certifyTrueAndAccurate: 'Certifico que la información dada es correcta',
error: {
termsAndConditions: 'Debe aceptar términos y condiciones',
certify: 'Debe certificar que la información es verdadera y precisa',
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/pages/EnablePayments/TermsStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class TermsStep extends React.Component {
/>
{this.state.error && (
<Text style={[styles.formError, styles.mb2]}>
{this.props.translate('termsStep.termsMustBeAccepted')}
{this.props.translate('common.error.acceptedTerms')}
</Text>
)}
<Button
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ReimbursementAccount/ACHContractStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ACHContractStep extends React.Component {

// Map a field to the key of the error's translation
this.errorTranslationKeys = {
acceptTermsAndConditions: 'beneficialOwnersStep.error.termsAndConditions',
acceptTermsAndConditions: 'common.error.acceptedTerms',
certifyTrueInformation: 'beneficialOwnersStep.error.certify',
};

Expand Down
2 changes: 2 additions & 0 deletions src/pages/ReimbursementAccount/BankAccountStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class BankAccountStep extends React.Component {
this.errorTranslationKeys = {
routingNumber: 'bankAccount.error.routingNumber',
accountNumber: 'bankAccount.error.accountNumber',
hasAcceptedTerms: 'common.error.acceptedTerms',
};

this.getErrorText = inputKey => ReimbursementAccountUtils.getErrorText(this.props, this.errorTranslationKeys, inputKey);
Expand Down Expand Up @@ -312,6 +313,7 @@ class BankAccountStep extends React.Component {
</TextLink>
</View>
)}
errorText={this.getErrorText('hasAcceptedTerms')}
hasError={this.getErrors().hasAcceptedTerms}
/>
</ReimbursementAccountForm>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings/Payments/AddDebitCardPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class DebitCardPage extends Component {
addressStreet: 'addDebitCardPage.error.addressStreet',
addressState: 'addDebitCardPage.error.addressState',
addressZipCode: 'addDebitCardPage.error.addressZipCode',
acceptedTerms: 'addDebitCardPage.error.acceptedTerms',
acceptedTerms: 'common.error.acceptedTerms',
password: 'addDebitCardPage.error.password',
};

Expand Down