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 2 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
2 changes: 1 addition & 1 deletion 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
2 changes: 1 addition & 1 deletion 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
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