mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +00:00
Form improvements
This commit is contained in:
parent
2b344f1f25
commit
35c9b6838e
@ -202,7 +202,9 @@ function createBuildOutput(build_id, options) {
|
|||||||
required: options.trackable_parts || trackable,
|
required: options.trackable_parts || trackable,
|
||||||
},
|
},
|
||||||
batch_code: {},
|
batch_code: {},
|
||||||
auto_allocate: {},
|
auto_allocate: {
|
||||||
|
hidden: !trackable,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// Work out the next available serial numbers
|
// Work out the next available serial numbers
|
||||||
|
@ -2014,7 +2014,7 @@ function constructField(name, parameters, options) {
|
|||||||
if (parameters.help_text && !options.hideLabels) {
|
if (parameters.help_text && !options.hideLabels) {
|
||||||
|
|
||||||
// Boolean values are handled differently!
|
// Boolean values are handled differently!
|
||||||
if (parameters.type != 'boolean') {
|
if (parameters.type != 'boolean' && !parameters.hidden) {
|
||||||
html += constructHelpText(name, parameters, options);
|
html += constructHelpText(name, parameters, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2022,7 +2022,6 @@ function constructField(name, parameters, options) {
|
|||||||
// Div for error messages
|
// Div for error messages
|
||||||
html += `<div id='errors-${field_name}'></div>`;
|
html += `<div id='errors-${field_name}'></div>`;
|
||||||
|
|
||||||
|
|
||||||
html += `</div>`; // controls
|
html += `</div>`; // controls
|
||||||
html += `</div>`; // form-group
|
html += `</div>`; // form-group
|
||||||
|
|
||||||
@ -2212,6 +2211,10 @@ function constructInputOptions(name, classes, type, parameters, options={}) {
|
|||||||
return `<textarea ${opts.join(' ')}></textarea>`;
|
return `<textarea ${opts.join(' ')}></textarea>`;
|
||||||
} else if (parameters.type == 'boolean') {
|
} else if (parameters.type == 'boolean') {
|
||||||
|
|
||||||
|
if (parameters.hidden) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
var help_text = '';
|
var help_text = '';
|
||||||
|
|
||||||
if (!options.hideLabels && parameters.help_text) {
|
if (!options.hideLabels && parameters.help_text) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user