Refactor how usa-legend is assigned

This commit is contained in:
Erin Song 2024-12-05 15:55:16 -08:00
parent 4671c8967f
commit 6854310449
No known key found for this signature in database
3 changed files with 2 additions and 4 deletions

View file

@ -155,6 +155,7 @@ footer {
.usa-radio {
margin-top: 1rem;
font-size: 1.06rem;
}
abbr[title] {

View file

@ -11,7 +11,7 @@
<fieldset class="usa-fieldset">
<!-- Toggle -->
{% with add_class="usa-radio__input--tile" add_legend_heading="Are you working with a CISA regional representative on your domain request?" %}
{% with add_class="usa-radio__input--tile" add_legend_class="margin-top-0" add_legend_heading="Are you working with a CISA regional representative on your domain request?" %}
{% input_with_errors forms.0.has_cisa_representative %}
{% endwith %}
{# forms.0 is a small yes/no form that toggles the visibility of "cisa representative" formset #}

View file

@ -119,9 +119,6 @@ def input_with_errors(context, field=None): # noqa: C901
else:
context["label_tag"] = "label"
if field.use_fieldset:
label_classes.append("usa-legend")
if field.widget_type == "checkbox":
label_classes.append("usa-checkbox__label")
elif not field.use_fieldset: