mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Merge pull request #2547 from SchrodingersGat/form-checkbox-patch
"patch" for legacy checkboxes in HTML forms
This commit is contained in:
commit
c64ab4b605
@ -372,6 +372,14 @@ function attachSelect(modal) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function attachBootstrapCheckbox(modal) {
|
||||||
|
/* Attach 'switch' functionality to any checkboxes on the form */
|
||||||
|
|
||||||
|
$(modal + ' .checkboxinput').addClass('form-check-input');
|
||||||
|
$(modal + ' .checkboxinput').wrap(`<div class='form-check form-switch'></div>`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function loadingMessageContent() {
|
function loadingMessageContent() {
|
||||||
/* Render a 'loading' message to display in a form
|
/* Render a 'loading' message to display in a form
|
||||||
* when waiting for a response from the server
|
* when waiting for a response from the server
|
||||||
@ -686,7 +694,9 @@ function injectModalForm(modal, form_html) {
|
|||||||
* Updates the HTML of the form content, and then applies some other updates
|
* Updates the HTML of the form content, and then applies some other updates
|
||||||
*/
|
*/
|
||||||
$(modal).find('.modal-form-content').html(form_html);
|
$(modal).find('.modal-form-content').html(form_html);
|
||||||
|
|
||||||
attachSelect(modal);
|
attachSelect(modal);
|
||||||
|
attachBootstrapCheckbox(modal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user