mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 14:38:00 -03:30
fix lookup field ids
This commit is contained in:
parent
1aacd94cb5
commit
29753c6b9b
@ -20,6 +20,7 @@ const QS_CONFIG = getQSConfig('execution_environments', {
|
||||
});
|
||||
|
||||
function ExecutionEnvironmentLookup({
|
||||
id,
|
||||
globallyAvailable,
|
||||
helperTextInvalid,
|
||||
isDefaultEnvironment,
|
||||
@ -154,7 +155,7 @@ function ExecutionEnvironmentLookup({
|
||||
const renderLookup = () => (
|
||||
<>
|
||||
<Lookup
|
||||
id="execution-environments"
|
||||
id={id}
|
||||
header={t`Execution Environment`}
|
||||
value={value}
|
||||
onBlur={onBlur}
|
||||
@ -213,7 +214,7 @@ function ExecutionEnvironmentLookup({
|
||||
|
||||
return (
|
||||
<FormGroup
|
||||
fieldId="execution-environment-lookup"
|
||||
fieldId={id}
|
||||
label={renderLabel(isGlobalDefaultEnvironment, isDefaultEnvironment)}
|
||||
labelIcon={popoverContent && <Popover content={popoverContent} />}
|
||||
helperTextInvalid={helperTextInvalid}
|
||||
@ -231,6 +232,7 @@ function ExecutionEnvironmentLookup({
|
||||
}
|
||||
|
||||
ExecutionEnvironmentLookup.propTypes = {
|
||||
id: string,
|
||||
value: ExecutionEnvironment,
|
||||
popoverContent: string,
|
||||
onChange: func.isRequired,
|
||||
@ -243,6 +245,7 @@ ExecutionEnvironmentLookup.propTypes = {
|
||||
};
|
||||
|
||||
ExecutionEnvironmentLookup.defaultProps = {
|
||||
id: 'execution-environments',
|
||||
popoverContent: '',
|
||||
isDefaultEnvironment: false,
|
||||
isGlobalDefaultEnvironment: false,
|
||||
|
||||
@ -236,6 +236,7 @@ function InventoryLookup({
|
||||
}
|
||||
|
||||
InventoryLookup.propTypes = {
|
||||
fieldId: string,
|
||||
value: Inventory,
|
||||
onChange: func.isRequired,
|
||||
required: bool,
|
||||
@ -247,6 +248,7 @@ InventoryLookup.propTypes = {
|
||||
};
|
||||
|
||||
InventoryLookup.defaultProps = {
|
||||
fieldId: 'inventory',
|
||||
value: null,
|
||||
required: false,
|
||||
isOverrideDisabled: false,
|
||||
|
||||
@ -128,7 +128,7 @@ function Lookup(props) {
|
||||
<InputGroup onBlur={onBlur}>
|
||||
<Button
|
||||
aria-label={t`Search`}
|
||||
id={id}
|
||||
id={`${id}-open`}
|
||||
onClick={() => dispatch({ type: 'TOGGLE_MODAL' })}
|
||||
variant={ButtonVariant.control}
|
||||
isDisabled={isLoading || isDisabled}
|
||||
@ -149,7 +149,7 @@ function Lookup(props) {
|
||||
</ChipHolder>
|
||||
) : (
|
||||
<TextInput
|
||||
id={`${id}-input`}
|
||||
id={id}
|
||||
value={typedText}
|
||||
onChange={(inputValue) => {
|
||||
setTypedText(inputValue);
|
||||
|
||||
@ -19,6 +19,7 @@ const QS_CONFIG = getQSConfig('organizations', {
|
||||
});
|
||||
|
||||
function OrganizationLookup({
|
||||
id,
|
||||
helperTextInvalid,
|
||||
isValid,
|
||||
onBlur,
|
||||
@ -94,7 +95,7 @@ function OrganizationLookup({
|
||||
|
||||
return (
|
||||
<FormGroup
|
||||
fieldId="organization"
|
||||
fieldId={id}
|
||||
helperTextInvalid={helperTextInvalid}
|
||||
isRequired={required}
|
||||
validated={isValid ? 'default' : 'error'}
|
||||
@ -103,7 +104,7 @@ function OrganizationLookup({
|
||||
>
|
||||
<Lookup
|
||||
isDisabled={isDisabled}
|
||||
id="organization"
|
||||
id={id}
|
||||
header={t`Organization`}
|
||||
value={value}
|
||||
onBlur={onBlur}
|
||||
@ -158,6 +159,7 @@ function OrganizationLookup({
|
||||
}
|
||||
|
||||
OrganizationLookup.propTypes = {
|
||||
id: string,
|
||||
helperTextInvalid: node,
|
||||
isValid: bool,
|
||||
onBlur: func,
|
||||
@ -171,6 +173,7 @@ OrganizationLookup.propTypes = {
|
||||
};
|
||||
|
||||
OrganizationLookup.defaultProps = {
|
||||
id: 'organization',
|
||||
helperTextInvalid: '',
|
||||
isValid: true,
|
||||
onBlur: () => {},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user