From 9cda9396218ef3dbf4753db51df47a552ae837c1 Mon Sep 17 00:00:00 2001 From: Tim Mallezie Date: Fri, 22 May 2015 19:56:24 +0200 Subject: [PATCH] add print-pdf-letter for event participants --- CRM/Event/Form/Task/PDF.php | 84 +++++++++++++++++++++++++++ CRM/Event/Task.php | 5 ++ templates/CRM/Event/Form/Task/PDF.tpl | 32 ++++++++++ 3 files changed, 121 insertions(+) create mode 100644 CRM/Event/Form/Task/PDF.php create mode 100644 templates/CRM/Event/Form/Task/PDF.tpl diff --git a/CRM/Event/Form/Task/PDF.php b/CRM/Event/Form/Task/PDF.php new file mode 100644 index 0000000000..97e00aae3e --- /dev/null +++ b/CRM/Event/Form/Task/PDF.php @@ -0,0 +1,84 @@ +assign('single', $this->_single); + } + + /** + * Build the form object. + */ + public function buildQuickForm() { + CRM_Contact_Form_Task_PDFLetterCommon::buildQuickForm($this); + } + + /** + * Process the form after the input has been submitted and validated. + */ + public function postProcess() { + CRM_Contact_Form_Task_PDFLetterCommon::postProcess($this); + } + +} diff --git a/CRM/Event/Task.php b/CRM/Event/Task.php index fcf13dd917..d354fb89ed 100644 --- a/CRM/Event/Task.php +++ b/CRM/Event/Task.php @@ -125,6 +125,11 @@ class CRM_Event_Task { 'class' => 'CRM_Event_Form_Task_Badge', 'result' => FALSE, ), + 17 => array( + 'title' => ts('Print PDF Letter for Participants'), + 'class' => 'CRM_Event_Form_Task_PDF', + 'result' => TRUE, + ), 20 => array( 'title' => ts('Add Contacts to Group'), 'class' => 'CRM_Event_Form_Task_AddToGroup', diff --git a/templates/CRM/Event/Form/Task/PDF.tpl b/templates/CRM/Event/Form/Task/PDF.tpl new file mode 100644 index 0000000000..a72a3d7ed5 --- /dev/null +++ b/templates/CRM/Event/Form/Task/PDF.tpl @@ -0,0 +1,32 @@ +{* ++--------------------------------------------------------------------+ +| CiviCRM version 4.6 | ++--------------------------------------------------------------------+ +| Copyright CiviCRM LLC (c) 2004-2015 | ++--------------------------------------------------------------------+ +| This file is a part of CiviCRM. | +| | +| CiviCRM is free software; you can copy, modify, and distribute it | +| under the terms of the GNU Affero General Public License | +| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | +| | +| CiviCRM is distributed in the hope that it will be useful, but | +| WITHOUT ANY WARRANTY; without even the implied warranty of | +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | +| See the GNU Affero General Public License for more details. | +| | +| You should have received a copy of the GNU Affero General Public | +| License and the CiviCRM Licensing Exception along | +| with this program; if not, contact CiviCRM LLC | +| at info[AT]civicrm[DOT]org. If you have questions about the | +| GNU Affero General Public License or the licensing of CiviCRM, | +| see the CiviCRM license FAQ at http://civicrm.org/licensing | ++--------------------------------------------------------------------+ +*} +
+ {if $single eq false} +
{include file="CRM/Event/Form/Task.tpl"}
+ {/if} + {include file="CRM/Contact/Form/Task/PDFLetterCommon.tpl"} +
{include file="CRM/common/formButtons.tpl" location="bottom"}
+
-- 2.25.1