mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Specify custom help text for fields on the client side
This commit is contained in:
parent
621f47e46c
commit
1f75530910
@ -275,7 +275,9 @@
|
|||||||
fields: {
|
fields: {
|
||||||
name: {},
|
name: {},
|
||||||
description: {},
|
description: {},
|
||||||
parent: {},
|
parent: {
|
||||||
|
help_text: '{% trans "Select parent category" %}',
|
||||||
|
},
|
||||||
default_location: {},
|
default_location: {},
|
||||||
default_keywords: {
|
default_keywords: {
|
||||||
icon: 'fa-key',
|
icon: 'fa-key',
|
||||||
|
@ -286,6 +286,11 @@ function constructFormBody(fields, options) {
|
|||||||
// Edit callback
|
// Edit callback
|
||||||
fields[field].onEdit = field_options.onEdit;
|
fields[field].onEdit = field_options.onEdit;
|
||||||
|
|
||||||
|
// Custom help_text
|
||||||
|
if (field_options.help_text) {
|
||||||
|
fields[field].help_text = field_options.help_text;
|
||||||
|
}
|
||||||
|
|
||||||
// Field prefix
|
// Field prefix
|
||||||
if (field_options.prefix) {
|
if (field_options.prefix) {
|
||||||
fields[field].prefix = field_options.prefix;
|
fields[field].prefix = field_options.prefix;
|
||||||
|
Loading…
Reference in New Issue
Block a user