From 490e8aa21378b9d4e62b0e62ee02690ebc24541f Mon Sep 17 00:00:00 2001 From: Monish Deb Date: Wed, 21 Jul 2021 14:49:20 +0530 Subject: [PATCH 1/2] Wysiwyg support for i18n event field - Confirmation Email Text --- CRM/Core/I18n/SchemaStructure.php | 2 +- CRM/Event/DAO/Event.php | 4 ++-- xml/schema/Event/Event.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Core/I18n/SchemaStructure.php b/CRM/Core/I18n/SchemaStructure.php index 3752833f5d55..dd39f3165116 100644 --- a/CRM/Core/I18n/SchemaStructure.php +++ b/CRM/Core/I18n/SchemaStructure.php @@ -671,7 +671,7 @@ public static function &widgets() { 'cols' => "50", ], 'confirm_email_text' => [ - 'type' => "TextArea", + 'type' => "RichTextEditor", 'rows' => "4", 'cols' => "50", ], diff --git a/CRM/Event/DAO/Event.php b/CRM/Event/DAO/Event.php index e1391f4ac652..8d2040775f12 100644 --- a/CRM/Event/DAO/Event.php +++ b/CRM/Event/DAO/Event.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Event/Event.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:4b2cc938c8bb6e8bcba91513d109ff5f) + * (GenCodeChecksum:cac18042d92a7b9b75c08f8519ef890c) */ /** @@ -1135,7 +1135,7 @@ public static function &fields() { 'bao' => 'CRM_Event_BAO_Event', 'localizable' => 1, 'html' => [ - 'type' => 'TextArea', + 'type' => 'RichTextEditor', ], 'add' => '1.7', ], diff --git a/xml/schema/Event/Event.xml b/xml/schema/Event/Event.xml index 10c768ca808c..964b792bb9b1 100644 --- a/xml/schema/Event/Event.xml +++ b/xml/schema/Event/Event.xml @@ -423,7 +423,7 @@ text Confirmation Email Text - TextArea + RichTextEditor 4 50 From 3b7e3345c1b350597e99f78dc77d446b0929cc1a Mon Sep 17 00:00:00 2001 From: Monish Deb Date: Wed, 21 Jul 2021 22:57:13 +0530 Subject: [PATCH 2/2] update widget --- CRM/Event/Form/ManageEvent/Registration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Event/Form/ManageEvent/Registration.php b/CRM/Event/Form/ManageEvent/Registration.php index 16fcd9c3f5d5..b03432309685 100644 --- a/CRM/Event/Form/ManageEvent/Registration.php +++ b/CRM/Event/Form/ManageEvent/Registration.php @@ -398,7 +398,7 @@ public function buildMailBlock(&$form) { $form->registerRule('emailList', 'callback', 'emailList', 'CRM_Utils_Rule'); $attributes = CRM_Core_DAO::getAttribute('CRM_Event_DAO_Event'); $form->addYesNo('is_email_confirm', ts('Send Confirmation Email?'), NULL, NULL, ['onclick' => "return showHideByValue('is_email_confirm','','confirmEmail','block','radio',false);"]); - $form->add('textarea', 'confirm_email_text', ts('Text'), $attributes['confirm_email_text']); + $form->addField('confirm_email_text', ['label' => ts('Text'), 'class' => 'collapsed']); $form->add('text', 'cc_confirm', ts('CC Confirmation To'), CRM_Core_DAO::getAttribute('CRM_Event_DAO_Event', 'cc_confirm')); $form->addRule('cc_confirm', ts('Please enter a valid list of comma delimited email addresses'), 'emailList'); $form->add('text', 'bcc_confirm', ts('BCC Confirmation To'), CRM_Core_DAO::getAttribute('CRM_Event_DAO_Event', 'bcc_confirm'));