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:
@ -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();
|
||||
|
Reference in New Issue
Block a user