Skip to content
Snippets Groups Projects
Verified Commit 70f2ff77 authored by Lloyd Meins's avatar Lloyd Meins :thought_balloon:
Browse files

Add preferences to disable dashboard auto updating

parent b7629f83
No related branches found
No related tags found
No related merge requests found
Pipeline #15733 passed
......@@ -386,3 +386,13 @@ class PDFFileExpirationDuration(IntegerPreference):
default = 3
verbose_name = _("PDF file expiration duration")
help_text = _("in minutes")
@person_preferences_registry.register
class AutoUpdatingDashboard(BooleanPreference):
"""User preference for automatically updating the dashboard."""
section = general
name = "automatically_update_dashboard"
default = True
verbose_name = _("Automatically update the dashboard and its widgets")
......@@ -110,5 +110,7 @@
</div>
{% endif %}
<script type="text/javascript" src="{% static "js/include_ajax_live.js" %}"></script>
{% if user.person.preferences.general__automatically_update_dashboard %}
<script type="text/javascript" src="{% static "js/include_ajax_live.js" %}"></script>
{% endif %}
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment