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] KnowATeacherPage #30434

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/TeachersUnite/KnowATeacherPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import React, {useCallback} from 'react';
import {View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
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 @@ -99,7 +100,7 @@ function KnowATeacherPage(props) {
title={translate('teachersUnitePage.iKnowATeacher')}
onBackButtonPress={() => Navigation.goBack(ROUTES.TEACHERS_UNITE)}
/>
<Form
<FormProvider
enabledWhenOffline
style={[styles.flexGrow1, styles.ph5]}
formID={ONYXKEYS.FORMS.I_KNOW_A_TEACHER_FORM}
Expand All @@ -109,7 +110,8 @@ function KnowATeacherPage(props) {
>
<Text style={[styles.mb6]}>{translate('teachersUnitePage.getInTouch')}</Text>
<View>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="firstName"
name="fname"
label={translate('common.firstName')}
Expand All @@ -120,7 +122,8 @@ function KnowATeacherPage(props) {
/>
</View>
<View style={styles.mv4}>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="lastName"
name="lname"
label={translate('common.lastName')}
Expand All @@ -131,7 +134,8 @@ function KnowATeacherPage(props) {
/>
</View>
<View>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="partnerUserID"
name="partnerUserID"
label={`${translate('common.email')}/${translate('common.phoneNumber')}`}
Expand All @@ -141,7 +145,7 @@ function KnowATeacherPage(props) {
autoCapitalize="none"
/>
</View>
</Form>
</FormProvider>
</ScreenWrapper>
);
}
Expand Down
Loading