From 1da5618204919f479cf145561ec51c226c6d3960 Mon Sep 17 00:00:00 2001 From: Guillaume Lajarige Date: Tue, 21 Mar 2017 09:53:57 +0000 Subject: [PATCH] =?UTF-8?q?N=C2=B0606=20Portal:=20Request=20template=20fie?= =?UTF-8?q?lds=20marked=20as=20invalid=20when=20a=20mandatory=20textarea?= =?UTF-8?q?=20field=20was=20empty.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVN:trunk[4605] --- .../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( + <<