mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-30 19:24:58 -04:00
Expands the API of the macro to allow nested checkboxes to have a summary tracking the current selection, the fieldset to expand/collapse and buttons to be added to allow jumping between states. Includes making 'Done' button inline on mobile. Helps differentiate it form the form submit.
31 lines
1.0 KiB
HTML
31 lines
1.0 KiB
HTML
{% from "components/checkbox.html" import checkbox, checkboxes_nested %}
|
||
{% from "components/radios.html" import radio, radios, conditional_radio_panel %}
|
||
|
||
<fieldset class="form-group">
|
||
<legend class="form-label heading-small">
|
||
Permissions
|
||
</legend>
|
||
<span class="hint">
|
||
All team members can see sent messages.
|
||
</span>
|
||
{% for field in form.permissions_fields %}
|
||
{{ checkbox(field) }}
|
||
{% endfor %}
|
||
</fieldset>
|
||
|
||
{% if current_service.has_permission("edit_folder_permissions") and form.folder_permissions.all_template_folders %}
|
||
{{ checkboxes_nested(form.folder_permissions, form.folder_permissions.children(), hide_legend=True, collapsible_opts={ 'field': 'folder' }) }}
|
||
{% endif %}
|
||
|
||
{% if service_has_email_auth %}
|
||
{% if not 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 %}
|