2018-07-17 14:39:04 +01:00
|
|
|
{% extends "withnav_template.html" %}
|
2018-07-18 15:31:34 +01:00
|
|
|
{% from "components/table.html" import mapping_table, row_group, row, text_field, edit_field, field, boolean_field, list_table with context %}
|
2023-08-30 11:07:38 -04:00
|
|
|
{% from "components/components/button/macro.njk" import usaButton %}
|
2018-07-17 14:39:04 +01:00
|
|
|
|
|
|
|
|
{% block service_page_title %}
|
2018-08-20 16:59:35 +01:00
|
|
|
Data retention
|
2018-07-17 14:39:04 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block maincolumn_content %}
|
|
|
|
|
|
2023-08-23 16:18:25 -04:00
|
|
|
<div class="grid-row bottom-gutter">
|
|
|
|
|
<div class="grid-col-8">
|
2023-06-06 15:28:24 -04:00
|
|
|
<h1 class="font-body-2xl margin-bottom-3">
|
2018-07-17 14:39:04 +01:00
|
|
|
Data retention
|
|
|
|
|
</h1>
|
|
|
|
|
</div>
|
2023-08-23 16:18:25 -04:00
|
|
|
<div class="grid-col-4">
|
2023-08-30 11:07:38 -04:00
|
|
|
{{ usaButton({
|
2020-01-30 14:01:13 +00:00
|
|
|
"element": "a",
|
|
|
|
|
"text": "Add data retention",
|
|
|
|
|
"href": url_for('.add_data_retention', service_id=current_service.id),
|
|
|
|
|
"classes": "align-with-heading"
|
|
|
|
|
}) }}
|
2018-07-17 14:39:04 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-08-23 16:18:25 -04:00
|
|
|
<div class="grid-row bottom-gutter">
|
|
|
|
|
<div class="grid-col-12">
|
2018-07-17 14:39:04 +01:00
|
|
|
By default data is kept for 7 days
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-08-27 15:57:48 +01:00
|
|
|
{% if not current_service.data_retention %}
|
|
|
|
|
<div class="user-list">
|
2018-07-17 14:39:04 +01:00
|
|
|
<div class="user-list-item">
|
2023-08-25 11:49:13 -04:00
|
|
|
<p class="usa-body user-list-item-blank hint">You have not added any data retention</p>
|
2018-07-17 14:39:04 +01:00
|
|
|
</div>
|
2020-08-27 15:57:48 +01:00
|
|
|
</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)}}
|
2020-10-19 16:47:55 +01:00
|
|
|
{{ text_field(item.days_of_retention|string + ' days') }}
|
2020-08-27 15:57:48 +01:00
|
|
|
{{ edit_field('Change', url_for('.edit_data_retention', service_id=current_service.id, data_retention_id=item.id)) }}
|
|
|
|
|
{% endcall %}
|
2018-07-17 14:39:04 +01:00
|
|
|
|
2020-08-27 15:57:48 +01:00
|
|
|
{% endfor %}
|
|
|
|
|
{% endcall %}
|
|
|
|
|
{% endif %}
|
2018-07-17 14:39:04 +01:00
|
|
|
|
|
|
|
|
{% endblock %}
|