Update all single field checkboxes

Includes adding some code to govukCheckboxesField
to add a single boolean-like option by default, if
there are no choices added.
This commit is contained in:
Tom Byers
2020-04-09 16:31:19 +01:00
parent 33d8171675
commit 49ec2d77bb
10 changed files with 17 additions and 30 deletions

View File

@@ -108,8 +108,7 @@
{% call form_wrapper(method="get") %}
{{ textbox(form.start_date, hint="Enter start date in format YYYY-MM-DD") }}
{{ textbox(form.end_date, hint="Enter end date in format YYYY-MM-DD") }}
{{ checkbox(form.include_from_test_key) }}
</br>
{{ form.include_from_test_key }}
{{ govukButton({ "text": "Filter" }) }}
{% endcall %}
{% endset %}

View File

@@ -55,9 +55,7 @@
hint='This should be a shared inbox managed by your team, not your own email address'
) }}
{% if not first_email_address and not existing_is_default %}
<div class="form-group">
{{ checkbox(form.is_default) }}
</div>
{{ form.is_default }}
{% endif %}
{{ page_footer('Try again') }}
{% endcall %}

View File

@@ -24,9 +24,7 @@
safe_error_message=True
) }}
{% if not first_email_address %}
<div class="form-group">
{{ checkbox(form.is_default) }}
</div>
{{ form.is_default }}
{% endif %}
{{ page_footer('Add') }}
{% endcall %}

View File

@@ -29,9 +29,7 @@
</p>
{{ page_footer('Save') }}
{% else %}
<div class="form-group">
{{ checkbox(form.is_default) }}
</div>
{{ form.is_default }}
{{ page_footer(
'Save',
delete_link=url_for('.service_confirm_delete_email_reply_to', service_id=current_service.id, reply_to_email_id=reply_to_email_address_id),

View File

@@ -27,9 +27,7 @@
highlight_placeholders=True
) }}
{% if not first_contact_block %}
<div class="form-group">
{{ checkbox(form.is_default) }}
</div>
{{ form.is_default }}
{% endif %}
{{ page_footer('Add') }}
{% endcall %}

View File

@@ -31,9 +31,7 @@
This is currently your default address for {{ current_service.name }}.
</p>
{% else %}
<div class="form-group">
{{ checkbox(form.is_default) }}
</div>
{{ form.is_default }}
{% endif %}
{{ page_footer(

View File

@@ -23,9 +23,7 @@
hint='Up to 11 characters, letters, numbers and spaces only'
) }}
{% if not first_sms_sender %}
<div class="form-group">
{{ checkbox(form.is_default) }}
</div>
{{ form.is_default }}
{% endif %}
{{ page_footer('Save') }}
{% endcall %}

View File

@@ -35,9 +35,7 @@
</p>
{{ page_footer('Save') }}
{% else %}
<div class="form-group">
{{ checkbox(form.is_default) }}
</div>
{{ form.is_default }}
{% if inbound_number %}
{{ page_footer('Save') }}
{% else %}