mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
add error messages for InventorySelect
This commit is contained in:
parent
857683e548
commit
8e2622d117
@ -12,13 +12,23 @@ const getInventories = async params => InventoriesAPI.read(params);
|
||||
|
||||
class InventoryLookup extends React.Component {
|
||||
render() {
|
||||
const { value, tooltip, onChange, required, i18n } = this.props;
|
||||
const {
|
||||
value,
|
||||
tooltip,
|
||||
onChange,
|
||||
required,
|
||||
isValid,
|
||||
helperTextInvalid,
|
||||
i18n,
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<FormGroup
|
||||
label={i18n._(t`Inventory`)}
|
||||
isRequired={required}
|
||||
fieldId="inventory-lookup"
|
||||
isValid={isValid}
|
||||
helperTextInvalid={helperTextInvalid}
|
||||
>
|
||||
{tooltip && <FieldTooltip content={tooltip} />}
|
||||
<Lookup
|
||||
|
||||
@ -240,6 +240,8 @@ class JobTemplateForm extends Component {
|
||||
form.setFieldValue('organizationId', value.organization);
|
||||
this.setState({ inventory: value });
|
||||
}}
|
||||
isValid={!form.errors.inventory}
|
||||
helperTextInvalid={form.errors.inventory}
|
||||
required
|
||||
/>
|
||||
)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user