Commit 98fe0595 authored by Tobias Siegler's avatar Tobias Siegler Committed by waldhacker
Browse files

[TASK] Improve form element header in form inspector

If a field contains a label that is too long, this creates an ugly line
break in the form element header. And also the label of the field is
displayed redundantly below the header. So we output the field type
instead of the label.

Resolves: #97488
Releases: main
Change-Id: Ia33b0b41697ecf4cb43bad51069596322fa4a704

Tested-by: core-ci's avatarcore-ci <>
Tested-by: default avatarAndreas Steiger <>
Tested-by: Björn Jacob's avatarBjörn Jacob <>
Tested-by: waldhacker's avatarwaldhacker <>
Reviewed-by: default avatarAndreas Steiger <>
Reviewed-by: Björn Jacob's avatarBjörn Jacob <>
Reviewed-by: waldhacker's avatarwaldhacker <>
parent 5107f249
......@@ -2666,9 +2666,15 @@ function factory($, Helper, Icons, Notification, Modal, MessageUtility) {
assert('object' === $.type(formElement), 'Invalid parameter "formElement"', 1478967319);
return $('<span></span>').text((formElement.get('label')
? formElement.get('label')
: formElement.get('identifier')));
if (formElement.get('type') === 'Form') {
label = formElement.get('type');
} else {
label = getFormElementDefinition(formElement, 'label')
? getFormElementDefinition(formElement, 'label')
: formElement.get('identifier');
return $('<span></span>').text(label);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment