diff --git a/InvenTree/static/script/modal_form.js b/InvenTree/static/script/modal_form.js index 28a1a46df1..931f1e8d6d 100644 --- a/InvenTree/static/script/modal_form.js +++ b/InvenTree/static/script/modal_form.js @@ -1,3 +1,7 @@ +function makeOption(id, title) { + return ""; +} + function attachSelect(modal) { // Attach to any 'select' inputs on the modal @@ -53,6 +57,10 @@ function modalSetContent(modal, content='') { $(modal).find('.modal-form-content').html(content); } +function modalSetButtonText(modal, text) { + $(modal).find("#modal-form-submit").html(text); +} + function openModal(modal, title='', content='') { @@ -212,7 +220,7 @@ function launchModalForm(modal, url, options = {}) { } if (response.submit_text) { - $(modal + ' #modal-form-submit').html(response.submit_text); + modalSetButtonText(response.submit_text); } if (response.html_form) {