mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
move settings
This commit is contained in:
parent
e95cc7c699
commit
c7329da7e0
@ -1239,14 +1239,6 @@ class InvenTreeUserSetting(BaseInvenTreeSetting):
|
||||
'default': True,
|
||||
'validator': bool,
|
||||
},
|
||||
|
||||
'NOTIFICATION_SEND_EMAILS': {
|
||||
'name': _('Enable email notifications'),
|
||||
'description': _('Allow sending of emails for event notifications'),
|
||||
'default': True,
|
||||
'validator': bool,
|
||||
},
|
||||
|
||||
'LABEL_ENABLE': {
|
||||
'name': _('Enable label printing'),
|
||||
'description': _('Enable label printing from the web interface'),
|
||||
|
@ -6,12 +6,12 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from allauth.account.models import EmailAddress
|
||||
|
||||
from plugin import IntegrationPluginBase
|
||||
from plugin.mixins import BulkNotificationMethod
|
||||
from plugin.mixins import BulkNotificationMethod, SettingsMixin
|
||||
from common.models import InvenTreeUserSetting
|
||||
import InvenTree.tasks
|
||||
|
||||
|
||||
class CoreNotificationsPlugin(IntegrationPluginBase):
|
||||
class CoreNotificationsPlugin(SettingsMixin, IntegrationPluginBase):
|
||||
"""
|
||||
Core notification methods for InvenTree
|
||||
"""
|
||||
@ -20,6 +20,15 @@ class CoreNotificationsPlugin(IntegrationPluginBase):
|
||||
AUTHOR = _('InvenTree contributors')
|
||||
DESCRIPTION = _('Integrated outgoing notificaton methods')
|
||||
|
||||
SETTINGS = {
|
||||
'NOTIFICATION_SEND_EMAILS': {
|
||||
'name': _('Enable email notifications'),
|
||||
'description': _('Allow sending of emails for event notifications'),
|
||||
'default': True,
|
||||
'validator': bool,
|
||||
},
|
||||
}
|
||||
|
||||
class EmailNotification(BulkNotificationMethod):
|
||||
METHOD_NAME = 'mail'
|
||||
CONTEXT_EXTRA = [
|
||||
|
Loading…
Reference in New Issue
Block a user