From 53cc93f572dc83a68ec10f0174d8720c18f6608c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=A4rter?= Date: Wed, 30 Oct 2024 08:20:49 +0100 Subject: [PATCH 1/2] Issue #3720: Implemented class handling for lens on richtext df. --- Kernel/Output/HTML/DynamicField/Mask.pm | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Kernel/Output/HTML/DynamicField/Mask.pm b/Kernel/Output/HTML/DynamicField/Mask.pm index 67ef9f45f0..afb67c0768 100644 --- a/Kernel/Output/HTML/DynamicField/Mask.pm +++ b/Kernel/Output/HTML/DynamicField/Mask.pm @@ -172,9 +172,21 @@ sub EditSectionRender { next FIELD; } - my $DynamicField = $Param{DynamicFields}{ $Field->{DF} }; - my $DFName = "DynamicField_$Field->{DF}"; - my $FieldClasses = 'Field' . ( $DynamicField->{FieldType} eq 'RichText' ? ' RichTextField' : '' ); + my $DynamicField = $Param{DynamicFields}{ $Field->{DF} }; + my $DFName = "DynamicField_$Field->{DF}"; + my $IsRichTextField = 0; + if ( $DynamicField->{FieldType} eq 'RichText' ) { + $IsRichTextField = 1; + } + elsif ( $DynamicField->{FieldType} eq 'Lens' ) { + my $AttributeDF = $Kernel::OM->Get('Kernel::System::DynamicField')->DynamicFieldGet( + ID => $DynamicField->{Config}{AttributeDF}, + ); + if ( $AttributeDF->{FieldType} eq 'RichText' ) { + $IsRichTextField = 1; + } + } + my $FieldClasses = 'Field' . ( $IsRichTextField ? ' RichTextField' : '' ); # don't set a default value for hidden fields my %InvisibleNoDefault; From d8d8305638f916da583393b09adda07315d33d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=A4rter?= Date: Wed, 30 Oct 2024 08:21:15 +0100 Subject: [PATCH 2/2] Issue #3720: Corrected issue comment. Updated richtext lens usage. --- Kernel/Modules/AdminDynamicFieldLens.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Kernel/Modules/AdminDynamicFieldLens.pm b/Kernel/Modules/AdminDynamicFieldLens.pm index 6b226a3f6f..23eca6db41 100644 --- a/Kernel/Modules/AdminDynamicFieldLens.pm +++ b/Kernel/Modules/AdminDynamicFieldLens.pm @@ -56,7 +56,7 @@ sub new { # see https://github.com/RotherOSS/issues/3186 CustomerUser => 0, - # see https://github.com/RotherOSS/otobo/issues/3793 + # see https://github.com/RotherOSS/otobo/issues/3534 Database => 0, Date => 1, DateTime => 1, @@ -75,9 +75,7 @@ sub new { # see https://github.com/RotherOSS/otobo/issues/3789 Lens => 0, Multiselect => 1, - - # see https://github.com/RotherOSS/otobo/issues/3720 and https://github.com/RotherOSS/otobo/issues/3815 - RichText => 0, + RichText => 1, # see https://github.com/RotherOSS/otobo/issues/3810 ScriptTemplateToolkit => 0,