2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 19:50:59 +00:00

Merge pull request #2492 from SchrodingersGat/plugin-settings-refactor

Plugin settings refactor
This commit is contained in:
Oliver
2022-01-07 14:12:22 +11:00
committed by GitHub
33 changed files with 649 additions and 320 deletions

View File

@ -28,9 +28,13 @@ function editSetting(pk, options={}) {
// Is this a global setting or a user setting?
var global = options.global || false;
var plugin = options.plugin;
var url = '';
if (global) {
if (plugin) {
url = `/api/plugin/settings/${pk}/`;
} else if (global) {
url = `/api/settings/global/${pk}/`;
} else {
url = `/api/settings/user/${pk}/`;