Merge pull request #8342 from AlexSCorey/8283-InventoryHelperMisalignment

Fixes invalid text location

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-10-08 19:49:43 +00:00 committed by GitHub
commit 0d4226a903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -227,10 +227,19 @@ function JobTemplateForm({
}}
/>
</FieldWithPrompt>
<>
<FormGroup
fieldId="inventory-lookup"
validated={
!(inventoryMeta.touched || askInventoryOnLaunchField.value) ||
!inventoryMeta.error
? 'default'
: 'error'
}
helperTextInvalid={inventoryMeta.error}
isRequired={!askInventoryOnLaunchField.value}
>
<InventoryLookup
value={inventory}
fieldId="template-inventory"
promptId="template-ask-inventory-on-launch"
promptName="ask_inventory_on_launch"
isPromptableField
@ -245,16 +254,7 @@ function JobTemplateForm({
touched={inventoryMeta.touched}
error={inventoryMeta.error}
/>
{(inventoryMeta.touched || askInventoryOnLaunchField.value) &&
inventoryMeta.error && (
<div
className="pf-c-form__helper-text pf-m-error"
aria-live="polite"
>
{inventoryMeta.error}
</div>
)}
</>
</FormGroup>
<ProjectLookup
value={projectField.value}
onBlur={() => projectHelpers.setTouched()}