mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-10 13:23:40 -05:00
We can't control the case of either 'name' or 'thing' so the comparison should make them both the same.
14 lines
505 B
HTML
14 lines
505 B
HTML
{% macro api_key(key, name, thing="API key") %}
|
|
{% if name|lower == thing|lower %}
|
|
<h2 class="api-key__name">
|
|
{{ name }}
|
|
</h2>
|
|
{% endif %}
|
|
<div data-module="api-key" data-key="{{ key }}" data-thing="{{ thing }}" data-name="{{ name }}">
|
|
<span class="api-key__key">
|
|
{% if name|lower != thing|lower %}<span class="govuk-visually-hidden">{{ thing }}: </span>{% endif %}{{ key }}
|
|
</span>
|
|
<span class="api-key__notice" aria-live="assertive"></span>
|
|
</div>
|
|
{% endmacro %}
|