diff --git a/InvenTree/static/css/inventree.css b/InvenTree/static/css/inventree.css index e096a94994..a603513cee 100644 --- a/InvenTree/static/css/inventree.css +++ b/InvenTree/static/css/inventree.css @@ -192,6 +192,16 @@ width: 100%; } +/* Force a control-label div to be 100% width */ +.modal .control-label { + width: 100%; +} + +.modal .control-label .btn { + padding-top: 3px; + padding-bottom: 3px; +} + /* The side navigation menu */ .sidenav { height: 100%; /* 100% Full-height */ diff --git a/InvenTree/static/script/inventree/modals.js b/InvenTree/static/script/inventree/modals.js index 6c6c449fb3..e4a7ed32fb 100644 --- a/InvenTree/static/script/inventree/modals.js +++ b/InvenTree/static/script/inventree/modals.js @@ -354,6 +354,18 @@ function injectModalForm(modal, form_html) { } +function insertNewItemButton(modal, field, text) { + + var html = ""; + + html += "
" + text + "
"; + + html += "
"; + + $(modal).find('label[for="id_'+ field + '"]').append(html); +} + + function handleModalForm(url, options) { /* Update a modal form after data are received from the server. * Manages POST requests until the form is successfully submitted.