diff --git a/InvenTree/company/templates/company/index.html b/InvenTree/company/templates/company/index.html index fef338078a..796796528f 100644 --- a/InvenTree/company/templates/company/index.html +++ b/InvenTree/company/templates/company/index.html @@ -45,6 +45,10 @@ method: 'POST', title: '{% trans "Edit Part Details" %}', fields: { + title: { + prefix: `` + }, + reference: {}, part: { filters: { } diff --git a/InvenTree/templates/js/forms.js b/InvenTree/templates/js/forms.js index 9343751926..318dfab1b4 100644 --- a/InvenTree/templates/js/forms.js +++ b/InvenTree/templates/js/forms.js @@ -275,6 +275,9 @@ function constructFormBody(fields, options) { // Edit callback fields[field].onEdit = field_options.onEdit; + + // Field prefix + fields[field].prefix = field_options.prefix; } } @@ -835,14 +838,21 @@ function constructField(name, parameters, options) { html += `
`; + if (parameters.prefix) { + html += `
${parameters.prefix}`; + } + html += constructInput(name, parameters, options); + if (parameters.prefix) { + html += `
`; // input-group + } + if (parameters.help_text) { html += constructHelpText(name, parameters, options); } html += `
`; // controls - html += ``; // form-group return html;