Skip to content

Commit

Permalink
fixed yes no (#351)
Browse files Browse the repository at this point in the history
Co-authored-by: Ana Medrano Fernandez <amedrano@codeforamerica.org@Anas-MacBook-Pro-2.local>
  • Loading branch information
analoo and Ana Medrano Fernandez authored Oct 13, 2023
1 parent 54d5cbd commit 09f2b02
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/main/resources/templates/fragments/inputs/yesOrNo.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
th:fragment="yesOrNo(inputName, ariaDescribe)"
th:with="
hasHelpText=${!#strings.isEmpty(helpText)},
hasAriaDescribe=${!#strings.isEmpty(ariaDescribe)}"
hasAriaDescribe=${!#strings.isEmpty(ariaDescribe)},
hasYesText=${!#strings.isEmpty(overrideYesText)},
hasNoText=${!#strings.isEmpty(overrideNoText)}"
th:assert="${!#strings.isEmpty(inputName)}, ${hasAriaDescribe}">
<div th:if="${hasHelpText}">
<p th:id="${inputName + '-help-text'}"
Expand All @@ -11,17 +13,19 @@
</div>
<button
th:name="${inputName}"
th:aria-describedby="${hasHelpText ? ariaDescribe + ' ' + inputName + '-help-text' : ariaDescribe}" type="submit"
th:aria-describedby="${hasHelpText ? ariaDescribe + ' ' + inputName + '-help-text' : ariaDescribe}"
type="submit"
value="true"
class="button button--primary">
<span th:text="#{general.inputs.yes}"></span>
<span th:text="#{${hasYesText ? overrideYesText : 'general.inputs.yes'}}"></span>
</button>
<button
th:name="${inputName}"
th:aria-describedby="${hasHelpText ? ariaDescribe + ' ' + inputName + '-help-text' : ariaDescribe}" value="false"
th:aria-describedby="${hasHelpText ? ariaDescribe + ' ' + inputName + '-help-text' : ariaDescribe}"
value="false"
th:href="'/flow/' + ${flow} + '/' + ${screen} + '/navigation'"
class="button button--secondary">
<span th:text="#{general.inputs.no}"></span>
<span th:text="#{${hasNoText ? overrideNoText : 'general.inputs.no'}}"></span>
</button>

</th:block>

0 comments on commit 09f2b02

Please sign in to comment.