diff --git a/CHANGELOG.md b/CHANGELOG.md index 87d50f5f..8f0c660d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed +- Fix display width for rich text fields - Fix massive action update on CustomAssets - Fix mandatory fields on a Tab block not being enforced when updating an item. - Fix administrators losing access to a block's configuration after setting a profile to "no access" on that block. diff --git a/templates/fields.html.twig b/templates/fields.html.twig index 666abea1..c53da422 100644 --- a/templates/fields.html.twig +++ b/templates/fields.html.twig @@ -65,9 +65,16 @@ }, } %} -{% set current_textarea_options = textarea_display_options[ - in_itilobject ? 'in_itilobject' : (in_projecttask ? 'in_projecttask' : (in_form_builder ? 'in_form_builder' : 'default')) -] %} +{% set display_context = in_itilobject ? 'in_itilobject' : (in_projecttask ? 'in_projecttask' : (in_form_builder ? 'in_form_builder' : 'default')) %} +{% set current_textarea_options = textarea_display_options[display_context] %} + +{# Rich text fields use the full row width #} +{% set current_richtext_options = display_context == 'default' ? current_textarea_options|merge({ + 'field_class': 'col-12', + 'input_class': 'col-xxl-12', + 'label_class': 'col-xxl-10', + 'align_label_right': false, + }) : current_textarea_options %} {% if not already_wrapped and not dropdown_item%} @@ -125,7 +132,7 @@ {{ macros.textareaField(input_name, value, label, field_options|merge(current_textarea_options)) }} {% elseif type == 'richtext' %} - {{ macros.textareaField(input_name, value, label, field_options|merge(current_textarea_options)|merge({ + {{ macros.textareaField(input_name, value, label, field_options|merge(current_richtext_options)|merge({ 'enable_richtext': true, })) }}