Formatting and linting changes

This commit is contained in:
alexjanousekGSA
2025-07-31 07:49:12 -04:00
parent 7d5db34d16
commit 31a9e39846
15 changed files with 62 additions and 33 deletions

View File

@@ -1,7 +1,7 @@
{% from "components/select-input.html" import select, select_list, select_nested, select_wrapper, select_input %}
{% macro radios(field, hint=None, disable=[], option_hints={}, hide_legend=False, inline=False) %}
{{ select(field, hint, disable, option_hints, hide_legend, input="radio", inline=inline) }}
{% macro radios(field, hint=None, disable=[], option_hints={}, hide_legend=False, inline=False, legend_style="text") %}
{{ select(field, hint, disable, option_hints, hide_legend, legend_style=legend_style, input="radio", inline=inline) }}
{% endmacro %}

View File

@@ -45,7 +45,11 @@
<fieldset id="{{ field.id }}" class="usa-fieldset" {% if inline %}class="inline"{% endif %}>
<legend class="{{ 'usa-legend' if not hide_legend else '' }}{% if legend_style != 'text' %} {{ legend_style }}{% endif %}">
{% if hide_legend %}<span class="usa-sr-only">{% endif %}
{{ field.label.text|safe }}
{% if legend_style == 'usa-legend--large' %}
<h1>{{ field.label.text|safe }}</h1>
{% else %}
{{ field.label.text|safe }}
{% endif %}
{% if hide_legend %}</span>{% endif %}
{% if hint %}
<span class="form-hint">

View File

@@ -20,17 +20,15 @@
{% call form_wrapper() %}
{{ form.key_name }}
<div class="api-key-radios margin-top-5">
{% if current_service.trial_mode %}
{{ radios(
form.key_type,
disable=['normal'],
option_hints={'normal': 'Not available because your service is in <a class="usa-link" href="/features/trial-mode">trial mode</a>'|safe}
) }}
{% else %}
{{ radios(form.key_type) }}
{% endif %}
</div>
{% if current_service.trial_mode %}
{{ radios(
form.key_type,
disable=['normal'],
option_hints={'normal': 'Not available because your service is in <a class="usa-link" href="/features/trial-mode">trial mode</a>'|safe}
) }}
{% else %}
{{ radios(form.key_type) }}
{% endif %}
{{ page_footer('Continue') }}
{% endcall %}

View File

@@ -16,7 +16,7 @@
<div class="grid-row">
{% call form_wrapper() %}
{{ radios(form.sender) }}
{{ radios(form.sender, legend_style='usa-legend--large') }}
<div class="grid-col-9">
{{ page_footer('Continue') }}
</div>

View File

@@ -18,7 +18,7 @@
<div class="grid-row">
{% call form_wrapper() %}
{{ radios(form.sender) }}
{{ radios(form.sender, legend_style='usa-legend--large') }}
<div class="grid-col-9">
{{ page_footer('Continue') }}
</div>