mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-22 00:49:23 -04:00
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:
@@ -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")],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user