2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 19:20:55 +00:00

add plugin install button

This commit is contained in:
Matthias
2021-11-18 16:16:25 +01:00
parent 5aa146127c
commit 5dbc5d141a
5 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,26 @@
{% load i18n %}
{% load inventree_extras %}
/* globals
constructForm,
*/
/* exported
installPlugin,
*/
function installPlugin() {
constructForm(`/api/plugin/install/`, {
method: 'POST',
title: '{% trans "Install Plugin" %}',
fields: {
url: {},
packagename: {},
confirm: {},
},
onSuccess: function(data) {
msg = '{% trans "The Plugin was installed" %}';
showMessage(msg, {style: 'success', details: data.result, timeout: 30000});
}
});
}