Include lang attribute in field labels

This commit is contained in:
Quincy Morgan
2020-09-22 13:33:52 -04:00
parent f2c150e83e
commit 93cf717110
2 changed files with 6 additions and 5 deletions

View File

@@ -23,7 +23,8 @@ export function presetField(fieldID, field) {
_this.t = (scope, options) => t(`presets.fields.${fieldID}.${scope}`, options);
_this.t.html = (scope, options) => t.html(`presets.fields.${fieldID}.${scope}`, options);
_this.label = () => _this.overrideLabel || _this.t('label', { 'default': fieldID });
_this.title = () => _this.overrideLabel || _this.t('label', { 'default': fieldID });
_this.label = () => _this.overrideLabel || _this.t.html('label', { 'default': fieldID });
const _placeholder = _this.placeholder;
_this.placeholder = () => _this.t('placeholder', { 'default': _placeholder });

View File

@@ -52,16 +52,16 @@ export function uiFormFields(context) {
var titles = [];
var moreFields = notShown.map(function(field) {
var label = field.label();
titles.push(label);
var title = field.title();
titles.push(title);
var terms = field.terms();
if (field.key) terms.push(field.key);
if (field.keys) terms = terms.concat(field.keys);
return {
title: label,
value: label,
title: title,
value: title,
field: field,
terms: terms
};