mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 16:47:45 -02:30
make InstanceGroupsLookup tooltip customizable via prop
This commit is contained in:
@@ -27,7 +27,7 @@ class InstanceGroupsLookup extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { value, onChange } = this.props;
|
const { value, tooltip, onChange } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
<I18n>
|
||||||
@@ -37,12 +37,16 @@ class InstanceGroupsLookup extends React.Component {
|
|||||||
<Fragment>
|
<Fragment>
|
||||||
{i18n._(t`Instance Groups`)}
|
{i18n._(t`Instance Groups`)}
|
||||||
{' '}
|
{' '}
|
||||||
|
{
|
||||||
|
tooltip && (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
position="right"
|
position="right"
|
||||||
content={i18n._(t`Select the Instance Groups for this Organization to run on.`)}
|
content={tooltip}
|
||||||
>
|
>
|
||||||
<QuestionCircleIcon />
|
<QuestionCircleIcon />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
)
|
||||||
|
}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
fieldId="add-org-form-instance-groups"
|
fieldId="add-org-form-instance-groups"
|
||||||
@@ -68,7 +72,12 @@ InstanceGroupsLookup.propTypes = {
|
|||||||
getInstanceGroups: PropTypes.func,
|
getInstanceGroups: PropTypes.func,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
value: PropTypes.arrayOf(PropTypes.object).isRequired,
|
value: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
|
tooltip: PropTypes.string,
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
InstanceGroupsLookup.defaultProps = {
|
||||||
|
tooltip: '',
|
||||||
|
};
|
||||||
|
|
||||||
export default InstanceGroupsLookup;
|
export default InstanceGroupsLookup;
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ class OrganizationForm extends Component {
|
|||||||
api={api}
|
api={api}
|
||||||
value={instanceGroups}
|
value={instanceGroups}
|
||||||
onChange={this.handleInstanceGroupsChange}
|
onChange={this.handleInstanceGroupsChange}
|
||||||
|
tooltip={i18n._(t`Select the Instance Groups for this Organization to run on.`)}
|
||||||
/>
|
/>
|
||||||
<FormActionGroup
|
<FormActionGroup
|
||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
|
|||||||
Reference in New Issue
Block a user