Skip to content

Commit

Permalink
Merge pull request #7978 from adeel0202/adeel-connect-bank-tos-error
Browse files Browse the repository at this point in the history
show ToS error in connect manual bank account page
  • Loading branch information
luacmartins authored Mar 3, 2022
2 parents ea691f0 + 61ad6c9 commit 3d2ec23
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
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

0 comments on commit 3d2ec23

Please sign in to comment.