Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
15 changes: 11 additions & 4 deletions templates/fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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%}

Expand Down Expand Up @@ -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,
})) }}

Expand Down
Loading