mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 21:25:42 +00:00 
			
		
		
		
	Form improvements
This commit is contained in:
		| @@ -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) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user