diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 56e41dd24b..54da688992 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -1193,6 +1193,13 @@ class InvenTreeUserSetting(BaseInvenTreeSetting): 'validator': bool, }, + 'NOTIFICATION_SEND_EMAILS': { + 'name': _('Enable email notifications'), + 'description': _('Allow sending of emails for event notifications'), + 'default': True, + 'validator': bool, + }, + "LABEL_INLINE": { 'name': _('Inline label display'), 'description': _('Display PDF labels in the browser, instead of downloading as a file'), diff --git a/InvenTree/templates/InvenTree/settings/settings.html b/InvenTree/templates/InvenTree/settings/settings.html index ba27187747..dbb526cfd3 100644 --- a/InvenTree/templates/InvenTree/settings/settings.html +++ b/InvenTree/templates/InvenTree/settings/settings.html @@ -22,6 +22,7 @@ {% include "InvenTree/settings/user_settings.html" %} {% include "InvenTree/settings/user_homepage.html" %} {% include "InvenTree/settings/user_search.html" %} +{% include "InvenTree/settings/user_notifications.html" %} {% include "InvenTree/settings/user_labels.html" %} {% include "InvenTree/settings/user_reports.html" %} {% include "InvenTree/settings/user_display.html" %} diff --git a/InvenTree/templates/InvenTree/settings/sidebar.html b/InvenTree/templates/InvenTree/settings/sidebar.html index 85e0b4ce94..9df6b0736f 100644 --- a/InvenTree/templates/InvenTree/settings/sidebar.html +++ b/InvenTree/templates/InvenTree/settings/sidebar.html @@ -14,6 +14,8 @@ {% include "sidebar_item.html" with label='user-home' text=text icon="fa-home" %} {% trans "Search Settings" as text %} {% include "sidebar_item.html" with label='user-search' text=text icon="fa-search" %} +{% trans "Notifications" as text %} +{% include "sidebar_item.html" with label='user-notifications' text=text icon="fa-bell" %} {% trans "Label Printing" as text %} {% include "sidebar_item.html" with label='user-labels' text=text icon="fa-tag" %} {% trans "Reporting" as text %} diff --git a/InvenTree/templates/InvenTree/settings/user_notifications.html b/InvenTree/templates/InvenTree/settings/user_notifications.html new file mode 100644 index 0000000000..4e9889ca69 --- /dev/null +++ b/InvenTree/templates/InvenTree/settings/user_notifications.html @@ -0,0 +1,20 @@ +{% extends "panel.html" %} + +{% load i18n %} +{% load inventree_extras %} + +{% block label %}user-notifications{% endblock label %} + +{% block heading %}{% trans "Notification Settings" %}{% endblock heading %} + +{% block content %} + +
+ + + {% include "InvenTree/settings/setting.html" with key="NOTIFICATION_SEND_EMAILS" icon='fa-envelope' user_setting=True %} + +
+
+ +{% endblock content %} \ No newline at end of file