mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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,
|
||||
},
|
||||
batch_code: {},
|
||||
auto_allocate: {},
|
||||
auto_allocate: {
|
||||
hidden: !trackable,
|
||||
},
|
||||
};
|
||||
|
||||
// Work out the next available serial numbers
|
||||
|
@ -2014,7 +2014,7 @@ function constructField(name, parameters, options) {
|
||||
if (parameters.help_text && !options.hideLabels) {
|
||||
|
||||
// Boolean values are handled differently!
|
||||
if (parameters.type != 'boolean') {
|
||||
if (parameters.type != 'boolean' && !parameters.hidden) {
|
||||
html += constructHelpText(name, parameters, options);
|
||||
}
|
||||
}
|
||||
@ -2022,7 +2022,6 @@ function constructField(name, parameters, options) {
|
||||
// Div for error messages
|
||||
html += `<div id='errors-${field_name}'></div>`;
|
||||
|
||||
|
||||
html += `</div>`; // controls
|
||||
html += `</div>`; // form-group
|
||||
|
||||
@ -2212,6 +2211,10 @@ function constructInputOptions(name, classes, type, parameters, options={}) {
|
||||
return `<textarea ${opts.join(' ')}></textarea>`;
|
||||
} else if (parameters.type == 'boolean') {
|
||||
|
||||
if (parameters.hidden) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var help_text = '';
|
||||
|
||||
if (!options.hideLabels && parameters.help_text) {
|
||||
|
Loading…
Reference in New Issue
Block a user