From ff339e0eba6c8ce44be40c3c303aaf98805a353b Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Mon, 25 Feb 2019 09:15:21 -0500 Subject: [PATCH] Update org edit form layout and remove chip group component from lookup; --- src/components/Lookup/Lookup.jsx | 22 +++--- .../screens/Organization/OrganizationEdit.jsx | 67 +++++++++---------- 2 files changed, 41 insertions(+), 48 deletions(-) diff --git a/src/components/Lookup/Lookup.jsx b/src/components/Lookup/Lookup.jsx index bc57dbb1c4..454b937edb 100644 --- a/src/components/Lookup/Lookup.jsx +++ b/src/components/Lookup/Lookup.jsx @@ -3,7 +3,6 @@ import PropTypes from 'prop-types'; import { SearchIcon, CubesIcon } from '@patternfly/react-icons'; import { Chip, - ChipGroup, Modal, Button, EmptyState, @@ -150,18 +149,15 @@ class Lookup extends React.Component { } = this.state; const { lookupHeader = 'items', value, columns } = this.props; - let chips = null; - if (value) { - chips = ( - - {value.map(chip => ( - this.toggleSelected(chip)}> - {chip.name} - - ))} - - ); - } + const chips = value ? ( +
+ {value.map(chip => ( + this.toggleSelected(chip)}> + {chip.name} + + ))} +
+ ) : null; return ( diff --git a/src/pages/Organizations/screens/Organization/OrganizationEdit.jsx b/src/pages/Organizations/screens/Organization/OrganizationEdit.jsx index 0ed3e8887d..2fd9f280ba 100644 --- a/src/pages/Organizations/screens/Organization/OrganizationEdit.jsx +++ b/src/pages/Organizations/screens/Organization/OrganizationEdit.jsx @@ -7,7 +7,6 @@ import { CardBody, Form, FormGroup, - Gallery, TextInput, } from '@patternfly/react-core'; @@ -201,10 +200,10 @@ class OrganizationEdit extends Component { return ( -
- - {({ i18n }) => ( - + + {({ i18n }) => ( + +
@@ -230,28 +228,9 @@ class OrganizationEdit extends Component { id="edit-org-form-description" name="description" onChange={this.onFieldChange} - type="text" value={description.value || ''} /> - - { instanceGroups.value - && ( - - ) - } - {({ custom_virtualenvs }) => ( custom_virtualenvs && custom_virtualenvs.length > 1 && ( @@ -271,16 +250,34 @@ class OrganizationEdit extends Component { ) )} - - )} - - - { error ?
error
: '' } - +
+ + { instanceGroups.value + && ( + + ) + } + + + { error ?
error
: '' } + + )} +
); }