Styling for name and description section:
As part of this, the empty placeholder span was removed from the text input macro and the span will now be conditionall rendered if there is an error message
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
classes='',
|
||||
noMaxWidth=False,
|
||||
optional=True,
|
||||
showOptional=True,
|
||||
showLabel=True,
|
||||
watch=False,
|
||||
show_validation=True) -%}
|
||||
@@ -40,7 +41,7 @@
|
||||
<label for={{field.name}}>
|
||||
<div class="usa-input__title">
|
||||
{{ label }}
|
||||
{% if optional %}
|
||||
{% if optional and showOptional %}
|
||||
<span class="usa-input-label-helper">(optional)</span>
|
||||
{% endif %}
|
||||
{% if tooltip and not disabled %}
|
||||
@@ -108,12 +109,7 @@
|
||||
/>
|
||||
|
||||
{% if show_validation %}
|
||||
<template v-if='showError'>
|
||||
<span class='usa-input__message' v-html='validationError'></span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span class='usa-input__message'></span>
|
||||
</template>
|
||||
<span v-if='showError' class='usa-input__message' v-html='validationError'></span>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user