2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-11 07:24:15 +00:00

Implementing more complex behaviour for StockItem creation form

This commit is contained in:
Oliver
2021-11-02 23:04:10 +11:00
parent ef305032c9
commit d8e3c40f78
2 changed files with 94 additions and 82 deletions

View File

@ -25,7 +25,9 @@
*/
/* exported
setFormGroupVisibility
hideFormInput,
setFormGroupVisibility,
showFormInput,
*/
/**
@ -1248,6 +1250,18 @@ function initializeGroups(fields, options) {
}
}
// Hide a form input
function hideFormInput(name, options) {
$(options.modal).find(`#div_id_${name}`).hide();
}
// Show a form input
function showFormInput(name, options) {
$(options.modal).find(`#div_id_${name}`).show();
}
// Hide a form group
function hideFormGroup(group, options) {
$(options.modal).find(`#form-panel-${group}`).hide();