mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Refactor settings page to use service model
There’s a lot of code in service settings which: - talks to the API directly through the clients - passes that information through to the Jinja template By encapsulating this logic in the service model: - the Jinja template can access the data directly - the logic can be reused across multiple methods
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-list">
|
||||
{% if not data_retention_settings %}
|
||||
{% if not current_service.data_retention %}
|
||||
<div class="user-list-item">
|
||||
<span class="hint">You haven’t added any data retention</span>
|
||||
</div>
|
||||
@@ -36,7 +36,7 @@
|
||||
field_headings_visible=False,
|
||||
caption_visible=False
|
||||
) %}
|
||||
{% for item in data_retention_settings %}
|
||||
{% for item in current_service.data_retention %}
|
||||
{% call row() %}
|
||||
{{ text_field(item.notification_type | format_notification_type)}}
|
||||
{{ text_field(item.days_of_retention) }}
|
||||
|
||||
Reference in New Issue
Block a user