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

[Form Provider Refactor] BankAccountManualStep #30525

Merged
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
16 changes: 10 additions & 6 deletions src/pages/ReimbursementAccount/BankAccountManualStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import React, {useCallback} from 'react';
import {Image} from 'react-native';
import _ from 'underscore';
import CheckboxWithLabel from '@components/CheckboxWithLabel';
import Form from '@components/Form';
import FormProvider from '@components/Form/FormProvider';
import InputWrapper from '@components/Form/InputWrapper';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import ScreenWrapper from '@components/ScreenWrapper';
import Text from '@components/Text';
Expand Down Expand Up @@ -84,7 +85,7 @@ function BankAccountManualStep(props) {
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_BANK_ACCOUNT}
onBackButtonPress={props.onBackButtonPress}
/>
<Form
<FormProvider
formID={ONYXKEYS.REIMBURSEMENT_ACCOUNT}
onSubmit={submit}
validate={validate}
Expand All @@ -97,7 +98,8 @@ function BankAccountManualStep(props) {
style={[styles.exampleCheckImage, styles.mb5]}
source={exampleCheckImage(preferredLocale)}
/>
<TextInput
<InputWrapper
InputComponent={TextInput}
autoFocus
shouldDelayFocus={shouldDelayFocus}
inputID="routingNumber"
Expand All @@ -110,7 +112,8 @@ function BankAccountManualStep(props) {
shouldSaveDraft
shouldUseDefaultValue={shouldDisableInputs}
/>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="accountNumber"
containerStyles={[styles.mt4]}
label={translate('bankAccount.accountNumber')}
Expand All @@ -122,7 +125,8 @@ function BankAccountManualStep(props) {
shouldSaveDraft
shouldUseDefaultValue={shouldDisableInputs}
/>
<CheckboxWithLabel
<InputWrapper
InputComponent={CheckboxWithLabel}
accessibilityLabel={`${translate('common.iAcceptThe')} ${translate('common.expensifyTermsOfService')}`}
style={styles.mt4}
inputID="acceptTerms"
Expand All @@ -135,7 +139,7 @@ function BankAccountManualStep(props) {
defaultValue={props.getDefaultStateForField('acceptTerms', false)}
shouldSaveDraft
/>
</Form>
</FormProvider>
</ScreenWrapper>
);
}
Expand Down
Loading