mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 08:48:46 -03:30
Use credential type value from hook value instead of accessing it directly
This commit is contained in:
@@ -105,19 +105,18 @@ function CredentialFormFields({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
{formik.values.credential_type !== undefined &&
|
{credTypeField.value !== undefined && credTypeField.value !== '' && (
|
||||||
formik.values.credential_type !== '' && (
|
<SubFormLayout>
|
||||||
<SubFormLayout>
|
<Title size="md">{i18n._(t`Type Details`)}</Title>
|
||||||
<Title size="md">{i18n._(t`Type Details`)}</Title>
|
{
|
||||||
{
|
{
|
||||||
{
|
[gceCredentialTypeId]: <GoogleComputeEngineSubForm />,
|
||||||
[gceCredentialTypeId]: <GoogleComputeEngineSubForm />,
|
[sshCredentialTypeId]: <ManualSubForm />,
|
||||||
[sshCredentialTypeId]: <ManualSubForm />,
|
[scmCredentialTypeId]: <SourceControlSubForm />,
|
||||||
[scmCredentialTypeId]: <SourceControlSubForm />,
|
}[credTypeField.value]
|
||||||
}[formik.values.credential_type]
|
}
|
||||||
}
|
</SubFormLayout>
|
||||||
</SubFormLayout>
|
)}
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user