2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-04 12:40:57 +00:00

Augment existing frontend code to allow adjustment of notification settings

This commit is contained in:
Oliver Walters
2022-05-08 10:50:57 +10:00
parent cd6a6b9196
commit dd017f36c7
2 changed files with 12 additions and 2 deletions

View File

@ -29,7 +29,8 @@ const plugins_enabled = false;
{% endif %}
/*
* Edit a setting value
* Interactively edit a setting value.
* Launches a modal dialog form to adjut the value of the setting.
*/
function editSetting(pk, options={}) {
@ -38,10 +39,14 @@ function editSetting(pk, options={}) {
var plugin = options.plugin;
var notification = options.notification;
var url = '';
if (plugin) {
url = `/api/plugin/settings/${pk}/`;
} else if (notification) {
url = `/api/settings/notification/${pk}/`;
} else if (global) {
url = `/api/settings/global/${pk}/`;
} else {