mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Only check for label printing plugins if plugins are enabled
This commit is contained in:
parent
2ce5b7c896
commit
05344a3675
@ -196,7 +196,7 @@ def isInvenTreeUpToDate():
|
|||||||
and stores it to the database as INVENTREE_LATEST_VERSION
|
and stores it to the database as INVENTREE_LATEST_VERSION
|
||||||
"""
|
"""
|
||||||
|
|
||||||
latest = common.models.InvenTreeSetting.get_setting('INVENTREE_LATEST_VERSION', None)
|
latest = common.models.InvenTreeSetting.get_setting('INVENTREE_LATEST_VERSION', backup_value=None, create=False)
|
||||||
|
|
||||||
# No record for "latest" version - we must assume we are up to date!
|
# No record for "latest" version - we must assume we are up to date!
|
||||||
if not latest:
|
if not latest:
|
||||||
|
@ -20,7 +20,8 @@ const global_settings = {
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
};
|
};
|
||||||
|
|
||||||
{% if plugins_enabled %}
|
{% plugins_enabled as p_en %}
|
||||||
|
{% if p_en %}
|
||||||
const plugins_enabled = true;
|
const plugins_enabled = true;
|
||||||
{% else %}
|
{% else %}
|
||||||
const plugins_enabled = false;
|
const plugins_enabled = false;
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
modalSetTitle,
|
modalSetTitle,
|
||||||
modalSubmit,
|
modalSubmit,
|
||||||
openModal,
|
openModal,
|
||||||
|
plugins_enabled,
|
||||||
showAlertDialog,
|
showAlertDialog,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -232,6 +233,7 @@ function selectLabel(labels, items, options={}) {
|
|||||||
var plugins = [];
|
var plugins = [];
|
||||||
|
|
||||||
// Request a list of available label printing plugins from the server
|
// Request a list of available label printing plugins from the server
|
||||||
|
if (plugins_enabled) {
|
||||||
inventreeGet(
|
inventreeGet(
|
||||||
`/api/plugin/`,
|
`/api/plugin/`,
|
||||||
{},
|
{},
|
||||||
@ -248,10 +250,11 @@ function selectLabel(labels, items, options={}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
var plugin_selection = '';
|
var plugin_selection = '';
|
||||||
|
|
||||||
if (plugins.length > 0) {
|
if (plugins_enabled && plugins.length > 0) {
|
||||||
plugin_selection =`
|
plugin_selection =`
|
||||||
<div class='form-group'>
|
<div class='form-group'>
|
||||||
<label class='control-label requiredField' for='id_plugin'>
|
<label class='control-label requiredField' for='id_plugin'>
|
||||||
|
Loading…
Reference in New Issue
Block a user