Files
notifications-admin/app/templates/components/checkbox.html
Chris Hill-Scott fb3e7b5fde Add letters to the request to go live page
It’s not either text messages, or emails, or both now – it’s any
combination of the three channels.

This commit adds ‘letters’ as an option on the request to go live page
by changing the radio buttons to a group of checkboxes, so the user can
choose as many or as few as they want.

This commit also does a bunch of housekeeping stuff around the tests for
this page, because they haven’t been touched in quite some time.
2017-09-27 10:46:52 +01:00

38 lines
698 B
HTML

{% macro checkbox(
field,
hint=False,
width='2-3'
) %}
<div class="multiple-choice">
<input
id="{{ field.id }}" name="{{ field.name }}" type="checkbox" value="y"
{% if field.data %}
checked
{% endif %}
>
<label for="{{ field.id }}">
{{ field.label.text }}
{% if hint %}
<div class="hint">
{{ hint }}
</div>
{% endif %}
</label>
</div>
{% endmacro %}
{% macro checkbox_group(
legend,
fields
) %}
<fieldset class="form-group">
<legend class="form-label">
{{ legend }}
</legend>
{% for field in fields %}
{{ checkbox(field) }}
{% endfor %}
</fieldset>
{% endmacro %}