From 56ed2c6afa1d8d7576aec1d5b45b408cb246909b Mon Sep 17 00:00:00 2001 From: mabashian Date: Thu, 24 Sep 2020 17:26:33 -0400 Subject: [PATCH] Autopopulate credential on container group form and organization on notification template form --- .../src/screens/InstanceGroup/shared/ContainerGroupForm.jsx | 5 +++-- .../NotificationTemplate/shared/NotificationTemplateForm.jsx | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/awx/ui_next/src/screens/InstanceGroup/shared/ContainerGroupForm.jsx b/awx/ui_next/src/screens/InstanceGroup/shared/ContainerGroupForm.jsx index 9b55685a6d..e8d734806f 100644 --- a/awx/ui_next/src/screens/InstanceGroup/shared/ContainerGroupForm.jsx +++ b/awx/ui_next/src/screens/InstanceGroup/shared/ContainerGroupForm.jsx @@ -21,7 +21,7 @@ import { import CredentialLookup from '../../../components/Lookup/CredentialLookup'; import { VariablesField } from '../../../components/CodeMirrorInput'; -function ContainerGroupFormFields({ i18n }) { +function ContainerGroupFormFields({ i18n, instanceGroup }) { const { setFieldValue } = useFormikContext(); const [credentialField, credentialMeta, credentialHelpers] = useField( 'credential' @@ -57,6 +57,7 @@ function ContainerGroupFormFields({ i18n }) { tooltip={i18n._( t`Credential to authenticate with Kubernetes or OpenShift. Must be of type "Kubernetes/OpenShift API Bearer Token”.` )} + autoPopulate={!instanceGroup?.id} /> (
- + {submitError && }