Show built in label printing plugin even if the external plugins are disabled (#5304)

This commit is contained in:
Miklós Márton 2023-07-21 13:55:51 +02:00 committed by GitHub
parent 45aa8c39b3
commit 6b4717cb28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,6 @@
modalShowSubmitButton,
modalSubmit,
openModal,
plugins_enabled,
showAlertDialog,
showMessage,
user_settings,
@ -34,24 +33,22 @@ function selectLabel(labels, items, options={}) {
var plugins = [];
// Request a list of available label printing plugins from the server
if (plugins_enabled) {
inventreeGet(
`/api/plugins/`,
{
mixin: 'labels',
},
{
async: false,
success: function(response) {
plugins = response;
}
inventreeGet(
`/api/plugins/`,
{
mixin: 'labels',
},
{
async: false,
success: function(response) {
plugins = response;
}
);
}
}
);
var plugin_selection = '';
if (plugins_enabled && plugins.length > 0) {
if (plugins.length > 0) {
plugin_selection =`
<div class='form-group'>
<label class='control-label requiredField' for='id_plugin'>