2019-02-25 16:23:28 +00:00
|
|
|
{% from "components/select-input.html" import select, select_list, select_nested, select_wrapper, select_input %}
|
2019-02-25 14:55:26 +00:00
|
|
|
|
2019-10-09 16:16:22 +01:00
|
|
|
{% 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) }}
|
2018-06-12 13:17:45 +01:00
|
|
|
{% endmacro %}
|
|
|
|
|
|
2018-12-18 14:40:53 +00:00
|
|
|
|
2019-02-25 14:55:26 +00:00
|
|
|
{% macro radio_list(options, child_map, disable=[], option_hints={}) %}
|
2019-02-25 16:23:28 +00:00
|
|
|
{{ select_list(options, child_map, disable, option_hints, input="radio") }}
|
2018-12-18 14:40:53 +00:00
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
2019-02-25 14:55:26 +00:00
|
|
|
{% macro radios_nested(field, child_map, hint=None, disable=[], option_hints={}, hide_legend=False) %}
|
2019-02-25 16:23:28 +00:00
|
|
|
{{ select_nested(field, child_map, hint, disable, option_hints, hide_legend, input="radio") }}
|
2016-06-29 17:10:49 +01:00
|
|
|
{% endmacro %}
|
2016-08-08 10:28:40 +01:00
|
|
|
|
2019-02-25 14:55:26 +00:00
|
|
|
|
2018-12-18 14:40:53 +00:00
|
|
|
{% macro radio(option, disable=[], option_hints={}, data_target=None, as_list_item=False) %}
|
2019-02-25 16:23:28 +00:00
|
|
|
{{ select_input(option, disable, option_hints, data_target, as_list_item, input="radio") }}
|
2018-05-18 14:05:48 +01:00
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
2016-08-07 09:17:49 +01:00
|
|
|
{% macro radio_select(
|
|
|
|
|
field,
|
|
|
|
|
hint=None,
|
2020-07-16 10:49:21 +01:00
|
|
|
wrapping_class='form-group',
|
Make start time explicit when previewing a broadcast
We recently introduced a form control that lets user choose when a
broadcast ends.
Based on the most recent research participant, we think:
- there is a specific misunderstanding of what this control does
- there is a general low level of understanding of what a ‘broadcast’
means
People will try to understand what a ‘broadcast’ is by using mental
models they have for other kinds of messaging, for example text
messages.
Other kinds of messaging are one-to-one, i.e. they go from a sender to a
recipient. They are not ongoing in any way.
Emails and texts are sent at a time (and for all practicable purposes
are received at that same time). So, when we present the user with
a form that controls time, they might well assume it controls the time
when the message will be sent.
This is a feature we offer for sending messages using a spreadsheet, and
that’s where we’ve borrowed this pattern from.
We reinforce this assumption with the labelling of the form control. By
front-loading it with the word ‘When’ we are playing to the users
confirmation bias, i.e. they are interpreting the meaning of the control
in a way that confirms their prior beliefs about how messaging works.
So this commit does two things:
- re-labels the form to front-load the word ‘End’ not ‘When’
- adds text to the page explaining when the broadcast will start, so
there’s a chance of overriding that confirmation bias
If we can get users to go through this before sending a broadcast for
real, it could help them learn what a broadcast is, and how it differs
from sending text messages.
2020-07-27 17:25:13 +01:00
|
|
|
show_now_as_default=True,
|
|
|
|
|
bold_legend=False
|
2016-08-07 09:17:49 +01:00
|
|
|
) %}
|
2017-04-10 11:16:22 +01:00
|
|
|
<div class="{{ wrapping_class }} {% if field.errors %} form-group-error{% endif %}">
|
2016-08-07 09:17:49 +01:00
|
|
|
<fieldset>
|
2023-08-25 10:40:56 -04:00
|
|
|
<legend class="form-label {% if bold_legend %}bold{% endif %}">
|
2017-02-13 09:50:26 +00:00
|
|
|
{{ field.label.text }}
|
2016-08-07 09:17:49 +01:00
|
|
|
{% if field.errors %}
|
2017-10-16 14:58:08 +01:00
|
|
|
<span class="error-message" data-module="track-error" data-error-type="{{ field.errors[0] }}" data-error-label="{{ field.name }}">
|
2016-08-07 09:17:49 +01:00
|
|
|
{{ field.errors[0] }}
|
|
|
|
|
</span>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</legend>
|
2020-07-16 19:27:33 +01:00
|
|
|
<div class="radio-select" data-module="radio-select" data-categories="{{ field.categories|join(',') }}" data-show-now-as-default="{{ show_now_as_default|string|lower }}">
|
2016-08-07 09:17:49 +01:00
|
|
|
<div class="radio-select-column">
|
|
|
|
|
{% for option in field %}
|
2016-12-19 10:36:17 +00:00
|
|
|
<div class="multiple-choice">
|
2016-08-07 09:17:49 +01:00
|
|
|
{{ option }}
|
2016-12-19 10:36:17 +00:00
|
|
|
<label for="{{ option.id }}">
|
|
|
|
|
{{ option.label.text }}
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
2016-08-07 09:17:49 +01:00
|
|
|
{% if loop.first %}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="radio-select-column">
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</fieldset>
|
|
|
|
|
</div>
|
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
2018-06-12 14:29:47 +01:00
|
|
|
{% macro conditional_radio_panel(id) %}
|
2019-09-05 12:10:24 +01:00
|
|
|
<div class="conditional-radios-panel js-hidden" id="{{ id }}">
|
2018-06-12 14:29:47 +01:00
|
|
|
{{ caller() }}
|
|
|
|
|
</div>
|
|
|
|
|
{% endmacro %}
|