mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 19:21:06 -03:30
Added 'Max Hosts' field in the Add/Edit Organization view
* max hosts field is enabled is user is superuser, otherwise it is disabled and default is 0 * OrganizationForm tests added for max hosts input * minMaxValue added in validators to validate user input for max hosts Signed-off-by: catjones9 <catjones@redhat.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
Tooltip,
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
import { Config } from '../../../contexts/Config';
|
||||
import { withNetwork } from '../../../contexts/Network';
|
||||
import CardCloseButton from '../../../components/CardCloseButton';
|
||||
import OrganizationForm from '../components/OrganizationForm';
|
||||
@@ -71,10 +72,15 @@ class OrganizationAdd extends React.Component {
|
||||
</Tooltip>
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<OrganizationForm
|
||||
handleSubmit={this.handleSubmit}
|
||||
handleCancel={this.handleCancel}
|
||||
/>
|
||||
<Config>
|
||||
{({ me }) => (
|
||||
<OrganizationForm
|
||||
handleSubmit={this.handleSubmit}
|
||||
handleCancel={this.handleCancel}
|
||||
me={me || {}}
|
||||
/>
|
||||
)}
|
||||
</Config>
|
||||
{error ? <div>error</div> : ''}
|
||||
</CardBody>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user