From e8871bc356918c9f4d56e44a397d9e0bbb3e9e73 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 30 Sep 2023 15:29:07 +1300 Subject: [PATCH] Smarty notices & errors, message template screen isAdmin is never assigned - or used in the called template so it is removed. The php block breaks in smarty3 & is moved to the php layer --- CRM/Contact/Form/Task/PDFTrait.php | 1 - templates/CRM/Admin/Form/MessageTemplates.tpl | 4 ++-- templates/CRM/Contact/Form/Task/PDFLetterCommon.hlp | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CRM/Contact/Form/Task/PDFTrait.php b/CRM/Contact/Form/Task/PDFTrait.php index 521e02664f..9e8219c27d 100644 --- a/CRM/Contact/Form/Task/PDFTrait.php +++ b/CRM/Contact/Form/Task/PDFTrait.php @@ -151,7 +151,6 @@ trait CRM_Contact_Form_Task_PDFTrait { $form->assign('totalSelectedContacts', !is_null($form->_contactIds) ? count($form->_contactIds) : 0); $form->add('select', 'document_type', ts('Document Type'), CRM_Core_SelectValues::documentFormat()); - $documentTypes = implode(',', CRM_Core_SelectValues::documentApplicationType()); $form->addElement('file', "document_file", 'Upload Document', 'size=30 maxlength=255 accept="' . $documentTypes . '"'); $form->addUploadElement("document_file"); diff --git a/templates/CRM/Admin/Form/MessageTemplates.tpl b/templates/CRM/Admin/Form/MessageTemplates.tpl index 1ccf31f3c9..3750619f9b 100644 --- a/templates/CRM/Admin/Form/MessageTemplates.tpl +++ b/templates/CRM/Admin/Form/MessageTemplates.tpl @@ -42,7 +42,7 @@ {$form.msg_subject.html|crmAddClass:huge} - {help id="id-token-subject" tplFile=$tplFile isAdmin=$isAdmin file="CRM/Contact/Form/Task/Email.hlp"} + {help id="id-token-subject" tplFile=$tplFile file="CRM/Contact/Form/Task/Email.hlp"} @@ -73,7 +73,7 @@
- {help id="id-token-html" tplFile=$tplFile isAdmin=$isAdmin file="CRM/Contact/Form/Task/Email.hlp"} + {help id="id-token-html" tplFile=$tplFile file="CRM/Contact/Form/Task/Email.hlp"}
diff --git a/templates/CRM/Contact/Form/Task/PDFLetterCommon.hlp b/templates/CRM/Contact/Form/Task/PDFLetterCommon.hlp index 7542fbdb61..0316510863 100644 --- a/templates/CRM/Contact/Form/Task/PDFLetterCommon.hlp +++ b/templates/CRM/Contact/Form/Task/PDFLetterCommon.hlp @@ -24,13 +24,12 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{php}$this->assign('uploadFormatsSupported', '.' . implode(', .', array_keys(CRM_Utils_PDF_Document::$ooxmlMap)));{/php} {htxt id="template"}

{ts}Select a pre-existing template, or upload a document for mail merge.{/ts}

- {ts 1=$uploadFormatsSupported}Supported file formats: %1{/ts} + {ts 1="docx, odt"}Supported file formats: docx, odt{/ts}

{/htxt} -- 2.25.1