From 5275d3943b5445b126b3b96db7a54f796932691d Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 24 Aug 2021 22:13:07 +1000 Subject: [PATCH] Adds option to hide labels and help text --- InvenTree/templates/js/translated/forms.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/InvenTree/templates/js/translated/forms.js b/InvenTree/templates/js/translated/forms.js index 292b1d89ad..b4bbdc2cc4 100644 --- a/InvenTree/templates/js/translated/forms.js +++ b/InvenTree/templates/js/translated/forms.js @@ -1514,7 +1514,9 @@ function constructField(name, parameters, options) { html += `
`; // Add a label - html += constructLabel(name, parameters); + if (!options.hideLabels) { + html += constructLabel(name, parameters); + } html += `
`; @@ -1561,7 +1563,7 @@ function constructField(name, parameters, options) { html += `
`; // input-group } - if (parameters.help_text) { + if (parameters.help_text && !options.hideLabels) { html += constructHelpText(name, parameters, options); }