mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add icon support for user settings
This commit is contained in:
parent
5b9f84a90f
commit
5f4c8b3a3e
@ -18,6 +18,7 @@ class NotificationMethod:
|
||||
"""
|
||||
|
||||
METHOD_NAME = ''
|
||||
METHOD_ICON = None
|
||||
CONTEXT_BUILTIN = ['name', 'message', ]
|
||||
CONTEXT_EXTRA = []
|
||||
GLOBAL_SETTING = None
|
||||
@ -156,7 +157,7 @@ class MethodStorageClass:
|
||||
# save definition
|
||||
methods.append({
|
||||
'key': new_key,
|
||||
'icon': 'envelope',
|
||||
'icon': getattr(item, 'METHOD_ICON', ''),
|
||||
'method': item.METHOD_NAME,
|
||||
})
|
||||
return methods
|
||||
|
@ -36,6 +36,7 @@ class CoreNotificationsPlugin(SettingsMixin, IntegrationPluginBase):
|
||||
|
||||
class EmailNotification(PlgMixin, BulkNotificationMethod):
|
||||
METHOD_NAME = 'mail'
|
||||
METHOD_ICON = 'fa-envelope'
|
||||
CONTEXT_EXTRA = [
|
||||
('template', ),
|
||||
('template', 'html', ),
|
||||
|
Loading…
Reference in New Issue
Block a user