mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-24 18:09:13 -04:00
* Updated header and footer * Moved files around and updated gulpfile to correct the build process when it goes to production * Updated fonts * Adjusted grid templating * Adding images to assets * Updated account pages, dashboard, and pages in message sending flow * Updated the styling for the landing pages in the account section once logged in
47 lines
2.2 KiB
Plaintext
47 lines
2.2 KiB
Plaintext
{% from "../error-message/macro.njk" import govukErrorMessage -%}
|
||
{% from "../hint/macro.njk" import govukHint %}
|
||
{% from "../label/macro.njk" import govukLabel %}
|
||
|
||
{#- a record of other elements that we need to associate with the input using
|
||
aria-describedby – for example hints or error messages -#}
|
||
{% set describedBy = params.describedBy if params.describedBy else "" %}
|
||
<div class="usa-form-group {%- if params.errorMessage %} usa-form-group--error{% endif %} {%- if params.formGroup.classes %} {{ params.formGroup.classes }}{% endif %}">
|
||
{{ govukLabel({
|
||
html: params.label.html,
|
||
text: params.label.text,
|
||
classes: params.label.classes,
|
||
isPageHeading: params.label.isPageHeading,
|
||
attributes: params.label.attributes,
|
||
for: params.id
|
||
}) | indent(2) | trim }}
|
||
{% if params.hint %}
|
||
{% set hintId = params.id + '-hint' %}
|
||
{% set describedBy = describedBy + ' ' + hintId if describedBy else hintId %}
|
||
{{ govukHint({
|
||
id: hintId,
|
||
classes: params.hint.classes,
|
||
attributes: params.hint.attributes,
|
||
html: params.hint.html,
|
||
text: params.hint.text
|
||
}) | indent(2) | trim }}
|
||
{% endif %}
|
||
{% if params.errorMessage %}
|
||
{% set errorId = params.id + '-error' %}
|
||
{% set describedBy = describedBy + ' ' + errorId if describedBy else errorId %}
|
||
{{ govukErrorMessage({
|
||
id: errorId,
|
||
classes: params.errorMessage.classes,
|
||
attributes: params.errorMessage.attributes,
|
||
html: params.errorMessage.html,
|
||
text: params.errorMessage.text,
|
||
visuallyHiddenText: params.errorMessage.visuallyHiddenText
|
||
}) | indent(2) | trim }}
|
||
{% endif %}
|
||
<input class="usa-input {%- if params.classes %} {{ params.classes }}{% endif %} {%- if params.errorMessage %} usa-input--error{% endif %}" id="{{ params.id }}" name="{{ params.name }}" type="{{ params.type | default('text') }}"
|
||
{%- if params.value %} value="{{ params.value}}"{% endif %}
|
||
{%- if describedBy %} aria-describedby="{{ describedBy }}"{% endif %}
|
||
{%- if params.autocomplete %} autocomplete="{{ params.autocomplete}}"{% endif %}
|
||
{%- if params.pattern %} pattern="{{ params.pattern }}"{% endif %}
|
||
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
||
</div>
|