Specify custom help text for fields on the client side

This commit is contained in:
Oliver 2021-06-30 01:07:36 +10:00
parent 621f47e46c
commit 1f75530910
2 changed files with 8 additions and 1 deletions

View File

@ -275,7 +275,9 @@
fields: {
name: {},
description: {},
parent: {},
parent: {
help_text: '{% trans "Select parent category" %}',
},
default_location: {},
default_keywords: {
icon: 'fa-key',

View File

@ -286,6 +286,11 @@ function constructFormBody(fields, options) {
// Edit callback
fields[field].onEdit = field_options.onEdit;
// Custom help_text
if (field_options.help_text) {
fields[field].help_text = field_options.help_text;
}
// Field prefix
if (field_options.prefix) {
fields[field].prefix = field_options.prefix;