2016-03-22 13:18:06 +00:00
|
|
|
|
{% from "components/checkbox.html" import checkbox %}
|
2018-06-12 14:29:47 +01:00
|
|
|
|
{% from "components/radios.html" import radio, radios, radios_wrapper, conditional_radio_panel %}
|
2016-03-22 13:18:06 +00:00
|
|
|
|
|
2018-06-12 14:29:47 +01:00
|
|
|
|
{% if 'caseworking' in current_service.permissions %}
|
2018-06-21 14:00:00 +01:00
|
|
|
|
<div class="conditional-radios" data-module='conditional-radios'>
|
|
|
|
|
|
{% call radios_wrapper(form.user_type) %}
|
2018-06-12 14:29:47 +01:00
|
|
|
|
{% for option in form.user_type %}
|
2018-06-21 14:00:00 +01:00
|
|
|
|
|
|
|
|
|
|
<div class="bottom-gutter-1-3">
|
|
|
|
|
|
{{ radio(option, option_hints={
|
|
|
|
|
|
'admin': 'See dashboard and team members',
|
|
|
|
|
|
'caseworker': 'Send messages and see sent messages'
|
|
|
|
|
|
}) }}
|
|
|
|
|
|
</div>
|
2018-06-12 14:29:47 +01:00
|
|
|
|
{% if option.data == 'admin' %}
|
2018-06-21 14:00:00 +01:00
|
|
|
|
{% call conditional_radio_panel('admin') %}
|
2018-06-12 14:29:47 +01:00
|
|
|
|
<fieldset class="form-group">
|
|
|
|
|
|
<legend class="form-label">
|
2018-06-21 14:00:00 +01:00
|
|
|
|
Extra permissions
|
2018-06-12 14:29:47 +01:00
|
|
|
|
</legend>
|
|
|
|
|
|
{{ checkbox(form.send_messages) }}
|
|
|
|
|
|
{{ checkbox(form.manage_templates) }}
|
|
|
|
|
|
{{ checkbox(form.manage_service) }}
|
|
|
|
|
|
{{ checkbox(form.manage_api_keys) }}
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
{% endif %}
|
2018-06-21 14:00:00 +01:00
|
|
|
|
|
2018-06-12 14:29:47 +01:00
|
|
|
|
{% endfor %}
|
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
</div>
|
2018-06-21 14:00:00 +01:00
|
|
|
|
|
2018-06-12 14:29:47 +01:00
|
|
|
|
{% else %}
|
|
|
|
|
|
<fieldset class="form-group">
|
|
|
|
|
|
<legend class="form-label">
|
|
|
|
|
|
Permissions
|
|
|
|
|
|
</legend>
|
|
|
|
|
|
{{ checkbox(form.send_messages) }}
|
|
|
|
|
|
{{ checkbox(form.manage_templates) }}
|
|
|
|
|
|
{{ checkbox(form.manage_service) }}
|
|
|
|
|
|
{{ checkbox(form.manage_api_keys) }}
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
<div class="bottom-gutter">
|
|
|
|
|
|
<p class="form-label">
|
|
|
|
|
|
All team members can see
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<ul class="list list-bullet">
|
|
|
|
|
|
<li>templates</li>
|
|
|
|
|
|
<li>history of sent messages</li>
|
|
|
|
|
|
<li>who the other team members are</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{% endif %}
|
2017-11-01 15:36:27 +00:00
|
|
|
|
|
|
|
|
|
|
{% if service_has_email_auth %}
|
2017-11-15 16:04:50 +00:00
|
|
|
|
{% if user_has_no_mobile_number %}
|
|
|
|
|
|
{{ radios(
|
|
|
|
|
|
form.login_authentication,
|
|
|
|
|
|
disable=['sms_auth'],
|
|
|
|
|
|
option_hints={'sms_auth': 'Not available because this team member hasn’t added a phone number to their profile'|safe}
|
|
|
|
|
|
) }}
|
|
|
|
|
|
{% else %}
|
|
|
|
|
|
{{ radios(form.login_authentication) }}
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
{% endif %}
|