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