Skip to content

Commit

Permalink
Merge pull request Expensify#30444 from software-mansion-labs/form-mi…
Browse files Browse the repository at this point in the history
…gration/IntroSchoolPrincipalPage

[Form Provider Refactor] IntroSchoolPrincipalPage
  • Loading branch information
luacmartins committed Oct 31, 2023
2 parents e661395 + 3ef9b3e commit 5945510
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/pages/TeachersUnite/IntroSchoolPrincipalPage.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 @@ -89,7 +90,7 @@ function IntroSchoolPrincipalPage(props) {
title={translate('teachersUnitePage.introSchoolPrincipal')}
onBackButtonPress={() => Navigation.goBack(ROUTES.TEACHERS_UNITE)}
/>
<Form
<FormProvider
enabledWhenOffline
style={[styles.flexGrow1, styles.ph5]}
formID={ONYXKEYS.FORMS.INTRO_SCHOOL_PRINCIPAL_FORM}
Expand All @@ -99,7 +100,8 @@ function IntroSchoolPrincipalPage(props) {
>
<Text style={[styles.mb6]}>{translate('teachersUnitePage.schoolPrincipalVerfiyExpense')}</Text>
<View>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="firstName"
name="firstName"
label={translate('teachersUnitePage.principalFirstName')}
Expand All @@ -110,7 +112,8 @@ function IntroSchoolPrincipalPage(props) {
/>
</View>
<View style={styles.mv4}>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="lastName"
name="lastName"
label={translate('teachersUnitePage.principalLastName')}
Expand All @@ -121,7 +124,8 @@ function IntroSchoolPrincipalPage(props) {
/>
</View>
<View>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="partnerUserID"
name="partnerUserID"
label={translate('teachersUnitePage.principalWorkEmail')}
Expand All @@ -131,7 +135,7 @@ function IntroSchoolPrincipalPage(props) {
autoCapitalize="none"
/>
</View>
</Form>
</FormProvider>
</ScreenWrapper>
);
}
Expand Down

0 comments on commit 5945510

Please sign in to comment.