diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.js b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.js index 873275c61e..1217ca3ba0 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.js @@ -20,9 +20,9 @@ import { EnabledVarField, EnabledValueField, HostFilterField, - BranchFormField, } from './SharedFields'; import getHelpText from '../Inventory.helptext'; +import FormField from 'components/FormField'; const SCMSubForm = ({ autoPopulateProject }) => { const helpText = getHelpText(); @@ -57,6 +57,7 @@ const SCMSubForm = ({ autoPopulateProject }) => { (value) => { setFieldValue('source_project', value); setFieldTouched('source_project', true, false); + setFieldValue('scm_branch', '', false); if (sourcePathField.value) { setFieldValue('source_path', ''); setFieldTouched('source_path', false); @@ -76,7 +77,15 @@ const SCMSubForm = ({ autoPopulateProject }) => { ); return ( <> - + {projectField.value?.allow_override && ( + + )} { /> ); }; - -export const BranchFormField = ({ label }) => { - const helpText = getHelpText(); - return ( - - ); -};