diff --git a/InvenTree/templates/js/translated/modals.js b/InvenTree/templates/js/translated/modals.js index 5195c67b46..2a90a54324 100644 --- a/InvenTree/templates/js/translated/modals.js +++ b/InvenTree/templates/js/translated/modals.js @@ -793,14 +793,25 @@ function attachSecondaries(modal, secondaries) { function insertActionButton(modal, options) { /* Insert a custom submission button */ - var html = ` - - - `; + var element = $(modal).find('#modal-footer-buttons'); - $(modal).find('#modal-footer-buttons').append(html); + // check if button already present + var already_present = false; + for(var child=element[0].firstElementChild; child; child=child.nextElementSibling){ + if (item.firstElementChild.name == options.name) { + already_present = true; + } + } + + if (already_present == false) { + var html = ` + + + `; + element.append(html); + } } function attachButtons(modal, buttons) {