mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Adds a per-user setting to allow sending of emails for notification events
This commit is contained in:
		| @@ -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'), | ||||
|   | ||||
| @@ -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" %} | ||||
|   | ||||
| @@ -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 %} | ||||
|   | ||||
| @@ -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 %} | ||||
|  | ||||
| <div class='row'> | ||||
|     <table class='table table-striped table-condensed'> | ||||
|         <tbody> | ||||
|             {% include "InvenTree/settings/setting.html" with key="NOTIFICATION_SEND_EMAILS" icon='fa-envelope' user_setting=True %} | ||||
|         </tbody> | ||||
|     </table> | ||||
| </div> | ||||
|  | ||||
| {% endblock content %} | ||||
		Reference in New Issue
	
	Block a user