Merge pull request #1425 from alphagov/split-settings

Split settings page into multiple sections
This commit is contained in:
Chris Hill-Scott
2017-08-22 12:22:50 +01:00
committed by GitHub
3 changed files with 91 additions and 10 deletions

View File

@@ -143,6 +143,25 @@
@include bold-16;
}
.table-field-headings {
th {
padding: 1px; /* needs some height for the grey border to show */
}
}
.table-field-headings-visible {
height: auto;
th {
padding: .75em 1.25em .5625em 0;
}
}
.table-field-headings,
.table-field-headings-visible {

View File

@@ -11,20 +11,30 @@
<h1 class="heading-large">Settings</h1>
<div class="bottom-gutter-3-2 body-copy-table">
<div class="bottom-gutter-3-2 dashboard-table body-copy-table">
{% call mapping_table(
caption='Settings',
caption='General',
field_headings=['Label', 'Value', 'Action'],
field_headings_visible=False,
caption_visible=False
) %}
{% call row() %}
{{ text_field('Service name') }}
{{ text_field(current_service.name) }}
{{ edit_field('Change', url_for('.service_name_change', service_id=current_service.id)) }}
{% endcall %}
{% endcall %}
{% call mapping_table(
caption='Email',
field_headings=['Label', 'Value', 'Action'],
field_headings_visible=False,
caption_visible=True
) %}
{% call row() %}
{{ text_field('Send emails') }}
{{ boolean_field('email' in current_service.permissions) }}
@@ -44,6 +54,15 @@
{% endif %}
{% endcall %}
{% call mapping_table(
caption='Text messages',
field_headings=['Label', 'Value', 'Action'],
field_headings_visible=False,
caption_visible=True
) %}
{% call row() %}
{{ text_field('Send text messages') }}
{{ boolean_field('sms' in current_service.permissions) }}
@@ -93,8 +112,17 @@
{% endif %}
{% endcall %}
{% call mapping_table(
caption='Letters',
field_headings=['Label', 'Value', 'Action'],
field_headings_visible=False,
caption_visible=True
) %}
{% call row() %}
{{ text_field('Letters') }}
{{ text_field('Send letters') }}
{{ boolean_field('letter' in current_service.permissions) }}
{{ edit_field('Change', url_for('.service_set_letters', service_id=current_service.id)) }}
{% endcall %}