From: Seamus Lee Date: Mon, 1 May 2023 07:11:50 +0000 (+1000) Subject: [REF] Add in I18n front end translation support and update widget to be a RichTextEdi... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7a7a5a851c494d5aac667609a53e4200cc8f181c;p=civicrm-core.git [REF] Add in I18n front end translation support and update widget to be a RichTextEditor for the translation given it is already a wysiyg in singlelingual mode --- diff --git a/CRM/Campaign/DAO/Survey.php b/CRM/Campaign/DAO/Survey.php index dd319d5772..7acaf692e8 100644 --- a/CRM/Campaign/DAO/Survey.php +++ b/CRM/Campaign/DAO/Survey.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Campaign/Survey.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:4b2846e419f4a7d5dcc44b80df895caf) + * (GenCodeChecksum:79c05054f18c94059ec35314ea6bbef6) */ /** @@ -417,7 +417,7 @@ class CRM_Campaign_DAO_Survey extends CRM_Core_DAO { 'bao' => 'CRM_Campaign_BAO_Survey', 'localizable' => 1, 'html' => [ - 'type' => 'TextArea', + 'type' => 'RichTextEditor', ], 'add' => '3.3', ], diff --git a/CRM/Core/I18n/SchemaStructure.php b/CRM/Core/I18n/SchemaStructure.php index f8bd1e27dd..765a8efd83 100644 --- a/CRM/Core/I18n/SchemaStructure.php +++ b/CRM/Core/I18n/SchemaStructure.php @@ -330,7 +330,7 @@ class CRM_Core_I18n_SchemaStructure { 'required' => "true", ], 'instructions' => [ - 'type' => "TextArea", + 'type' => "RichTextEditor", 'rows' => "20", 'cols' => "80", ], diff --git a/templates/CRM/Campaign/Form/Petition.tpl b/templates/CRM/Campaign/Form/Petition.tpl index 431e4cbe05..100cf4ef7a 100644 --- a/templates/CRM/Campaign/Form/Petition.tpl +++ b/templates/CRM/Campaign/Form/Petition.tpl @@ -32,7 +32,7 @@ {$form.title.html} - {$form.instructions.label} + {$form.instructions.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_survey' field='instructions' id=$surveyId}{/if} {$form.instructions.html} diff --git a/templates/CRM/Campaign/Form/Survey/Main.tpl b/templates/CRM/Campaign/Form/Survey/Main.tpl index b861552d1f..6d16494f81 100644 --- a/templates/CRM/Campaign/Form/Survey/Main.tpl +++ b/templates/CRM/Campaign/Form/Survey/Main.tpl @@ -33,7 +33,7 @@
{ts}Select the Activity Type.{/ts}
- {$form.instructions.label} + {$form.instructions.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_survey' field='instructions' id=$surveyId}{/if} {$form.instructions.html} diff --git a/xml/schema/Campaign/Survey.xml b/xml/schema/Campaign/Survey.xml index 52990e5878..4ec988168e 100644 --- a/xml/schema/Campaign/Survey.xml +++ b/xml/schema/Campaign/Survey.xml @@ -106,7 +106,7 @@ true Script instructions for volunteers to use for the survey. - TextArea + RichTextEditor 20 80