From 05289dc2413d7d7a8a30fa70e0db70784d1e2dd9 Mon Sep 17 00:00:00 2001 From: Guillaume Lajarige Date: Tue, 21 Mar 2017 09:55:46 +0000 Subject: [PATCH] =?UTF-8?q?(Retrofit=20from=20trunk)=20N=C2=B0606=20Portal?= =?UTF-8?q?:=20Request=20template=20fields=20marked=20as=20invalid=20when?= =?UTF-8?q?=20a=20mandatory=20textarea=20field=20was=20empty.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVN:2.3[4606] --- .../bssimplefieldrenderer.class.inc.php | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/sources/renderer/bootstrap/fieldrenderer/bssimplefieldrenderer.class.inc.php b/sources/renderer/bootstrap/fieldrenderer/bssimplefieldrenderer.class.inc.php index 3317d1a099..d7dc9b6035 100644 --- a/sources/renderer/bootstrap/fieldrenderer/bssimplefieldrenderer.class.inc.php +++ b/sources/renderer/bootstrap/fieldrenderer/bssimplefieldrenderer.class.inc.php @@ -411,18 +411,30 @@ EOF break; case 'Combodo\\iTop\\Form\\Field\\TextAreaField': case 'Combodo\\iTop\\Form\\Field\\CaseLogField': - // Overloading $sFormFieldOptions to include the set_current_value_callback. It would have been nicer to refactor the variable for all field types, but as this is a fix for a maintenance release, we rather be safe. - $sValidators = json_encode($aValidators); - $oOutput->AddJs( - <<oField->GetFormat() === TextAreaField::ENUM_FORMAT_HTML); + if($bRichEditor) + { + // Overloading $sFormFieldOptions to include the set_current_value_callback. It would have been nicer to refactor the variable for all field types, but as this is a fix for a maintenance release, we rather be safe. + $sValidators = json_encode($aValidators); + $oOutput->AddJs( + <<AddJs(InlineImage::FixImagesWidth()); + ); + // MagnificPopup on images + $oOutput->AddJs(InlineImage::FixImagesWidth()); + } + else + { + $oOutput->AddJs( + <<