Files
notifications-admin/app/templates/views/service-settings/data-retention.html
Jonathan Bobel f342e0fb6c Updating site to use USWDS styles (#509)
* Updated header and footer
* Updated fonts
* Moved files around and updated gulpfile to correct the build process when it goes to production
* Adjusted grid templating
* Added images to assets
* Update app/templates/components/uk_components/footer/template.njk

Co-authored-by: Steven Reilly <stvnrlly@users.noreply.github.com>
2023-06-06 15:28:24 -04:00

56 lines
1.8 KiB
HTML

{% extends "withnav_template.html" %}
{% from "components/table.html" import mapping_table, row_group, row, text_field, edit_field, field, boolean_field, list_table with context %}
{% from "components/uk_components/button/macro.njk" import govukButton %}
{% block service_page_title %}
Data retention
{% endblock %}
{% block maincolumn_content %}
<div class="govuk-grid-row bottom-gutter">
<div class="govuk-grid-column-two-thirds">
<h1 class="font-body-2xl margin-bottom-3">
Data retention
</h1>
</div>
<div class="govuk-grid-column-one-third">
{{ govukButton({
"element": "a",
"text": "Add data retention",
"href": url_for('.add_data_retention', service_id=current_service.id),
"classes": "align-with-heading"
}) }}
</div>
</div>
<div class="govuk-grid-row bottom-gutter">
<div class="govuk-grid-column-full">
By default data is kept for 7 days
</div>
</div>
{% if not current_service.data_retention %}
<div class="user-list">
<div class="user-list-item">
<p class="govuk-body user-list-item-blank hint">You have not added any data retention</p>
</div>
</div>
{% else %}
{% call mapping_table(
caption='Data retention',
field_headings=['Label', 'Value', 'Action'],
field_headings_visible=False,
caption_visible=False
) %}
{% for item in current_service.data_retention %}
{% call row() %}
{{ text_field(item.notification_type | format_notification_type)}}
{{ text_field(item.days_of_retention|string + ' days') }}
{{ edit_field('Change', url_for('.edit_data_retention', service_id=current_service.id, data_retention_id=item.id)) }}
{% endcall %}
{% endfor %}
{% endcall %}
{% endif %}
{% endblock %}