Update NodeTypeStep form to new FormLayout components

This commit is contained in:
John Mitchell
2020-02-20 17:00:23 -05:00
parent ad04b02e24
commit 21a92176b9
2 changed files with 4 additions and 8 deletions

View File

@@ -38,7 +38,7 @@ const Detail = ({
className, className,
dataCy, dataCy,
alwaysVisible, alwaysVisible,
isEncrypted isEncrypted,
}) => { }) => {
if (!value && typeof value !== 'number' && !alwaysVisible) { if (!value && typeof value !== 'number' && !alwaysVisible) {
return null; return null;

View File

@@ -5,7 +5,7 @@ import { func, number, shape, string } from 'prop-types';
import styled from 'styled-components'; import styled from 'styled-components';
import { Formik, Field } from 'formik'; import { Formik, Field } from 'formik';
import { Form, FormGroup, TextInput } from '@patternfly/react-core'; import { Form, FormGroup, TextInput } from '@patternfly/react-core';
import FormRow from '@components/FormRow'; import { FormFullWidthLayout } from '@components/FormLayout';
import AnsibleSelect from '@components/AnsibleSelect'; import AnsibleSelect from '@components/AnsibleSelect';
import InventorySourcesList from './InventorySourcesList'; import InventorySourcesList from './InventorySourcesList';
import JobTemplatesList from './JobTemplatesList'; import JobTemplatesList from './JobTemplatesList';
@@ -119,7 +119,7 @@ function NodeTypeStep({
> >
{() => ( {() => (
<Form css="margin-top: 20px;"> <Form css="margin-top: 20px;">
<FormRow> <FormFullWidthLayout>
<Field name="name"> <Field name="name">
{({ field, form }) => { {({ field, form }) => {
const isValid = const isValid =
@@ -149,8 +149,6 @@ function NodeTypeStep({
); );
}} }}
</Field> </Field>
</FormRow>
<FormRow>
<Field name="description"> <Field name="description">
{({ field }) => ( {({ field }) => (
<FormGroup <FormGroup
@@ -169,8 +167,6 @@ function NodeTypeStep({
</FormGroup> </FormGroup>
)} )}
</Field> </Field>
</FormRow>
<FormRow>
<FormGroup <FormGroup
label={i18n._(t`Timeout`)} label={i18n._(t`Timeout`)}
fieldId="approval-timeout" fieldId="approval-timeout"
@@ -236,7 +232,7 @@ function NodeTypeStep({
</Field> </Field>
</div> </div>
</FormGroup> </FormGroup>
</FormRow> </FormFullWidthLayout>
</Form> </Form>
)} )}
</Formik> </Formik>