diff --git a/src/ui/static/js/utils/settings.js b/src/ui/static/js/utils/settings.js index db1bcf01d..60c2007b0 100644 --- a/src/ui/static/js/utils/settings.js +++ b/src/ui/static/js/utils/settings.js @@ -1148,6 +1148,13 @@ class Settings { } setDisabledByMethod(inp, method) { + // Check if pro + const proDisabled = inp + .closest("[data-plugin-item]") + .hasAttribute("data-pro-disabled") + ? true + : false; + if (proDisabled) return inp.setAttribute("disabled", ""); if (method === "ui" || method === "default") { inp.removeAttribute("disabled"); } else { @@ -1269,17 +1276,23 @@ class Settings { inp.setAttribute("data-method", method); } - if (this.forceEnabled) { + const proDisabled = inp + .closest("[data-plugin-item]") + .hasAttribute("data-pro-disabled") + ? true + : false; + + if (proDisabled) return inp.setAttribute("disabled", ""); + + if (this.forceEnabled) return inp.removeAttribute("disabled"); + + if (method === "ui" || method === "default") { inp.removeAttribute("disabled"); } else { - if (method === "ui" || method === "default") { - inp.removeAttribute("disabled"); - } else { - inp.setAttribute("disabled", ""); - } - - if (global) inp.removeAttribute("disabled"); + inp.setAttribute("disabled", ""); } + + if (global) inp.removeAttribute("disabled"); }); } catch (err) {} } diff --git a/src/ui/templates/settings_plugins.html b/src/ui/templates/settings_plugins.html index 229f1ac73..de5544b88 100644 --- a/src/ui/templates/settings_plugins.html +++ b/src/ui/templates/settings_plugins.html @@ -1,7 +1,7 @@ {% set current_endpoint = current_endpoint or url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-') %} {% for plugin in plugins %} -