Adding views to view, add and edit service data retention policies.

Only visible to a platform admin.
A service can have a custom number of days to retain the notification data for each notification type.
This commit is contained in:
Rebecca Law
2018-07-17 14:39:04 +01:00
parent 13d05c5461
commit 4b8b571a87
12 changed files with 193 additions and 35 deletions

View File

@@ -1024,3 +1024,27 @@ class BrandingOptionsEmail(StripWhitespaceForm):
DataRequired()
],
)
class ServiceDataRetentionForm(StripWhitespaceForm):
notification_type = RadioField(
'What notification type?',
choices=[
('email', 'Email'),
('sms', 'SMS'),
('letter', 'Letter'),
],
validators=[DataRequired()],
)
days_of_retention = IntegerField(label="Days of retention",
validators=[validators.NumberRange(min=3, max=90,
message="Must be between 3 and 90")],
)
class ServiceDataRetentionEditForm(StripWhitespaceForm):
days_of_retention = IntegerField(label="Days of retention",
validators=[validators.NumberRange(min=3, max=90,
message="Must be between 3 and 90")],
)