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_NAME = ''
|
||||||
|
METHOD_ICON = None
|
||||||
CONTEXT_BUILTIN = ['name', 'message', ]
|
CONTEXT_BUILTIN = ['name', 'message', ]
|
||||||
CONTEXT_EXTRA = []
|
CONTEXT_EXTRA = []
|
||||||
GLOBAL_SETTING = None
|
GLOBAL_SETTING = None
|
||||||
@ -156,7 +157,7 @@ class MethodStorageClass:
|
|||||||
# save definition
|
# save definition
|
||||||
methods.append({
|
methods.append({
|
||||||
'key': new_key,
|
'key': new_key,
|
||||||
'icon': 'envelope',
|
'icon': getattr(item, 'METHOD_ICON', ''),
|
||||||
'method': item.METHOD_NAME,
|
'method': item.METHOD_NAME,
|
||||||
})
|
})
|
||||||
return methods
|
return methods
|
||||||
|
@ -36,6 +36,7 @@ class CoreNotificationsPlugin(SettingsMixin, IntegrationPluginBase):
|
|||||||
|
|
||||||
class EmailNotification(PlgMixin, BulkNotificationMethod):
|
class EmailNotification(PlgMixin, BulkNotificationMethod):
|
||||||
METHOD_NAME = 'mail'
|
METHOD_NAME = 'mail'
|
||||||
|
METHOD_ICON = 'fa-envelope'
|
||||||
CONTEXT_EXTRA = [
|
CONTEXT_EXTRA = [
|
||||||
('template', ),
|
('template', ),
|
||||||
('template', 'html', ),
|
('template', 'html', ),
|
||||||
|
Loading…
Reference in New Issue
Block a user