Smarty notices & errors, message template screen
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 30 Sep 2023 02:29:07 +0000 (15:29 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 30 Sep 2023 05:54:16 +0000 (18:54 +1300)
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
templates/CRM/Admin/Form/MessageTemplates.tpl
templates/CRM/Contact/Form/Task/PDFLetterCommon.hlp

index 521e02664f0897df15daf3b1fc0ee8d3a4abb2fc..9e8219c27d7a19f53806f701cef68a5b73ab6e5d 100644 (file)
@@ -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");
index 1ccf31f3c991a1fa16e9c602e174ea14086d3a2b..3750619f9b2ddabf6af73e2d63177476b851d00d 100644 (file)
@@ -42,7 +42,7 @@
           <td>
             {$form.msg_subject.html|crmAddClass:huge}
             <input class="crm-token-selector big" data-field="msg_subject" />
-            {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"}
           </td>
         </tr>
         <tr>
@@ -73,7 +73,7 @@
         <div class="crm-accordion-body">
           <div class="helpIcon" id="helphtml">
             <input class="crm-token-selector big" data-field="msg_html" />
-            {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"}
           </div>
           <div class="clear"></div>
           <div class='html'>
index 7542fbdb6198fe558198642b33e7d71aeea78e01..0316510863b77dbd8e372ea3bba58983539e256b 100644 (file)
  | 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"}
   <p>
     {ts}Select a pre-existing template, or upload a document for mail merge.{/ts}
   </p>
   <p>
-    {ts 1=$uploadFormatsSupported}Supported file formats: %1{/ts}
+    {ts 1="docx, odt"}Supported file formats: docx, odt{/ts}
   </p>
 {/htxt}