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] ValidationStep #32205

Merged
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
16 changes: 10 additions & 6 deletions src/pages/ReimbursementAccount/ValidationStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {ScrollView, View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import Button from '@components/Button';
import Form from '@components/Form';
import FormProvider from '@components/Form/FormProvider';
import InputWrapper from '@components/Form/InputWrapper';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import * as Expensicons from '@components/Icon/Expensicons';
import * as Illustrations from '@components/Icon/Illustrations';
Expand Down Expand Up @@ -141,7 +142,7 @@ function ValidationStep({reimbursementAccount, translate, onBackButtonPress, acc
</View>
)}
{!maxAttemptsReached && state === BankAccount.STATE.PENDING && (
<Form
<FormProvider
formID={ONYXKEYS.REIMBURSEMENT_ACCOUNT}
submitButtonText={translate('validationStep.buttonText')}
onSubmit={submit}
Expand All @@ -153,23 +154,26 @@ function ValidationStep({reimbursementAccount, translate, onBackButtonPress, acc
<Text style={[styles.mb2]}>{translate('validationStep.descriptionCTA')}</Text>
</View>
<View style={[styles.mv5]}>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="amount1"
shouldSaveDraft
containerStyles={[styles.mb1]}
placeholder="1.52"
inputMode={CONST.INPUT_MODE.DECIMAL}
role={CONST.ACCESSIBILITY_ROLE.TEXT}
/>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="amount2"
shouldSaveDraft
containerStyles={[styles.mb1]}
placeholder="1.53"
inputMode={CONST.INPUT_MODE.DECIMAL}
role={CONST.ACCESSIBILITY_ROLE.TEXT}
/>
<TextInput
<InputWrapper
InputComponent={TextInput}
shouldSaveDraft
inputID="amount3"
containerStyles={[styles.mb1]}
Expand All @@ -183,7 +187,7 @@ function ValidationStep({reimbursementAccount, translate, onBackButtonPress, acc
<Enable2FAPrompt />
</View>
)}
</Form>
</FormProvider>
)}
{isVerifying && (
<ScrollView style={[styles.flex1]}>
Expand Down
Loading