Skip to content

Commit de86811

Browse files
put help text in line with the boolean toggle
1 parent 959e9fe commit de86811

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

client/src/components/Form/FormElement.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,13 @@ function onAlert(value: string | undefined) {
341341
<FormError v-if="props.workflowRun && hasAlert && !unPopulatedError" :alerts="alerts" has-alert-class />
342342

343343
<div v-if="showField" class="ui-form-field" :data-label="props.title">
344-
<FormBoolean v-if="props.type === 'boolean'" :id="props.id" v-model="currentValue" />
344+
<div
345+
v-if="props.type === 'boolean'"
346+
:class="{ 'd-flex align-items-start flex-gapx-1': props.workflowRun }">
347+
<FormBoolean :id="props.id" v-model="currentValue" class="mr-2" />
348+
<!-- eslint-disable-next-line vue/no-v-html -->
349+
<span v-if="nonMdHelp" class="text-muted" v-html="nonMdHelp" />
350+
</div>
345351
<FormHidden v-else-if="isHiddenType" :id="props.id" v-model="currentValue" :info="attrs['info']" />
346352
<FormNumber
347353
v-else-if="props.type === 'integer' || props.type === 'float'"
@@ -440,7 +446,7 @@ function onAlert(value: string | undefined) {
440446

441447
<div v-if="showPreview" class="ui-form-preview pt-1 pl-2 mt-1">{{ previewText }}</div>
442448
<!-- eslint-disable-next-line vue/no-v-html -->
443-
<span v-if="nonMdHelp" class="ui-form-info form-text text-muted" v-html="nonMdHelp" />
449+
<span v-if="nonMdHelp && !props.workflowRun" class="ui-form-info form-text text-muted" v-html="nonMdHelp" />
444450
<span v-else-if="Boolean(helpText) && helpFormat === 'markdown'" class="ui-form-info form-text text-muted">
445451
<FormElementHelpMarkdown :content="helpText ?? ''" />
446452
</span>

0 commit comments

Comments
 (0)