diff --git a/InvenTree/InvenTree/static/script/inventree/modals.js b/InvenTree/InvenTree/static/script/inventree/modals.js index 5b76203927..83fdbd1bb1 100644 --- a/InvenTree/InvenTree/static/script/inventree/modals.js +++ b/InvenTree/InvenTree/static/script/inventree/modals.js @@ -397,6 +397,13 @@ function injectModalForm(modal, form_html) { } +function getFieldByName(modal, name) { + /* Find the field (with the given name) within the modal */ + + return $(modal).find(`#id_${name}`); +} + + function insertNewItemButton(modal, options) { /* Insert a button into a modal form, after a field label. * Looks for a