当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Mailing_BAO_Mailing::commonLetterCompose方法代码示例

本文整理汇总了PHP中CRM_Mailing_BAO_Mailing::commonLetterCompose方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Mailing_BAO_Mailing::commonLetterCompose方法的具体用法?PHP CRM_Mailing_BAO_Mailing::commonLetterCompose怎么用?PHP CRM_Mailing_BAO_Mailing::commonLetterCompose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Mailing_BAO_Mailing的用法示例。


在下文中一共展示了CRM_Mailing_BAO_Mailing::commonLetterCompose方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: buildQuickForm

 /**
  * Build the form
  *
  * @access public
  * @return void
  */
 static function buildQuickForm(&$form)
 {
     $form->assign('totalSelectedContacts', count($form->_contactIds));
     require_once "CRM/Mailing/BAO/Mailing.php";
     CRM_Mailing_BAO_Mailing::commonLetterCompose($form);
     $form->addDefaultButtons(ts('Make PDF Letters'));
     $form->addFormRule(array('CRM_Contact_Form_Task_PDFLetterCommon', 'formRule'), $form);
 }
开发者ID:bhirsch,项目名称:civicrm,代码行数:14,代码来源:PDFLetterCommon.php

示例2: buildQuickForm

 /**
  * Build the form
  *
  * @access public
  * @return void
  */
 static function buildQuickForm(&$form)
 {
     $form->assign('totalSelectedContacts', count($form->_contactIds));
     require_once "CRM/Mailing/BAO/Mailing.php";
     CRM_Mailing_BAO_Mailing::commonLetterCompose($form);
     if ($form->_single) {
         $cancelURL = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$form->_cid}&selectedChild=activity", false, null, false);
         if ($form->get('action') == CRM_Core_Action::VIEW) {
             $form->addButtons(array(array('type' => 'cancel', 'name' => ts('Done'), 'js' => array('onclick' => "location.href='{$cancelURL}'; return false;"))));
         } else {
             $form->addButtons(array(array('type' => 'submit', 'name' => ts('Make PDF Letter'), 'isDefault' => true), array('type' => 'cancel', 'name' => ts('Done'), 'js' => array('onclick' => "location.href='{$cancelURL}'; return false;"))));
         }
     } else {
         $form->addDefaultButtons(ts('Make PDF Letters'));
     }
     $form->addFormRule(array('CRM_Contact_Form_Task_PDFLetterCommon', 'formRule'), $form);
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:23,代码来源:PDFLetterCommon.php

示例3: buildQuickForm

 /**
  * Build the form
  *
  * @access public
  *
  * @return void
  */
 static function buildQuickForm(&$form)
 {
     $form->add('static', 'pdf_format_header', NULL, ts('Page Format'));
     $form->add('select', 'format_id', ts('Select Format'), array(0 => ts('- default -')) + CRM_Core_BAO_PdfFormat::getList(TRUE), FALSE, array('onChange' => "selectFormat( this.value, false );"));
     $form->add('select', 'paper_size', ts('Paper Size'), array(0 => ts('- default -')) + CRM_Core_BAO_PaperSize::getList(TRUE), FALSE, array('onChange' => "selectPaper( this.value ); showUpdateFormatChkBox();"));
     $form->add('static', 'paper_dimensions', NULL, ts('Width x Height'));
     $form->add('select', 'orientation', ts('Orientation'), CRM_Core_BAO_PdfFormat::getPageOrientations(), FALSE, array('onChange' => "updatePaperDimensions(); showUpdateFormatChkBox();"));
     $form->add('select', 'metric', ts('Unit of Measure'), CRM_Core_BAO_PdfFormat::getUnits(), FALSE, array('onChange' => "selectMetric( this.value );"));
     $form->add('text', 'margin_left', ts('Left Margin'), array('size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"), TRUE);
     $form->add('text', 'margin_right', ts('Right Margin'), array('size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"), TRUE);
     $form->add('text', 'margin_top', ts('Top Margin'), array('size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"), TRUE);
     $form->add('text', 'margin_bottom', ts('Bottom Margin'), array('size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"), TRUE);
     $form->add('checkbox', 'bind_format', ts('Always use this Page Format with the selected Template'));
     $form->add('checkbox', 'update_format', ts('Update Page Format (this will affect all templates that use this format)'));
     $form->assign('useThisPageFormat', ts('Always use this Page Format with the new template?'));
     $form->assign('useSelectedPageFormat', ts('Should the new template always use the selected Page Format?'));
     $form->assign('totalSelectedContacts', count($form->_contactIds));
     CRM_Mailing_BAO_Mailing::commonLetterCompose($form);
     if ($form->_single) {
         $cancelURL = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$form->_cid}&selectedChild=activity", FALSE, NULL, FALSE);
         if ($form->get('action') == CRM_Core_Action::VIEW) {
             $form->addButtons(array(array('type' => 'cancel', 'name' => ts('Done'), 'js' => array('onclick' => "location.href='{$cancelURL}'; return false;"))));
         } else {
             $form->addButtons(array(array('type' => 'submit', 'name' => ts('Make PDF Letter'), 'isDefault' => TRUE), array('type' => 'cancel', 'name' => ts('Done'), 'js' => array('onclick' => "location.href='{$cancelURL}'; return false;"))));
         }
     } else {
         $form->addDefaultButtons(ts('Make PDF Letters'));
     }
     $form->addFormRule(array('CRM_Contact_Form_Task_PDFLetterCommon', 'formRule'), $form);
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:37,代码来源:PDFLetterCommon.php

示例4: buildQuickForm

 /**
  * Build the form
  *
  * @var CRM_Core_Form $form
  *
  * @return void
  */
 static function buildQuickForm(&$form)
 {
     // This form outputs a file so should never be submitted via ajax
     $form->preventAjaxSubmit();
     //Added for CRM-12682: Add activity subject and campaign fields
     CRM_Campaign_BAO_Campaign::addCampaign($form);
     $form->add('text', 'subject', ts('Activity Subject'), array('size' => 45, 'maxlength' => 255), FALSE);
     $form->add('static', 'pdf_format_header', NULL, ts('Page Format: %1', array(1 => '<span class="pdf-format-header-label"></span>')));
     $form->addSelect('format_id', array('label' => ts('Select Format'), 'placeholder' => ts('Default'), 'entity' => 'message_template', 'field' => 'pdf_format_id', 'option_url' => 'civicrm/admin/pdfFormats'));
     $form->add('select', 'paper_size', ts('Paper Size'), array(0 => ts('- default -')) + CRM_Core_BAO_PaperSize::getList(TRUE), FALSE, array('onChange' => "selectPaper( this.value ); showUpdateFormatChkBox();"));
     $form->add('static', 'paper_dimensions', NULL, ts('Width x Height'));
     $form->add('select', 'orientation', ts('Orientation'), CRM_Core_BAO_PdfFormat::getPageOrientations(), FALSE, array('onChange' => "updatePaperDimensions(); showUpdateFormatChkBox();"));
     $form->add('select', 'metric', ts('Unit of Measure'), CRM_Core_BAO_PdfFormat::getUnits(), FALSE, array('onChange' => "selectMetric( this.value );"));
     $form->add('text', 'margin_left', ts('Left Margin'), array('size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"), TRUE);
     $form->add('text', 'margin_right', ts('Right Margin'), array('size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"), TRUE);
     $form->add('text', 'margin_top', ts('Top Margin'), array('size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"), TRUE);
     $form->add('text', 'margin_bottom', ts('Bottom Margin'), array('size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"), TRUE);
     $config = CRM_Core_Config::singleton();
     if ($config->wkhtmltopdfPath == false) {
         $form->add('text', 'stationery', ts('Stationery (relative path to PDF you wish to use as the background)'), array('size' => 25, 'maxlength' => 900, 'onkeyup' => "showUpdateFormatChkBox();"), FALSE);
     }
     $form->add('checkbox', 'bind_format', ts('Always use this Page Format with the selected Template'));
     $form->add('checkbox', 'update_format', ts('Update Page Format (this will affect all templates that use this format)'));
     $form->assign('useThisPageFormat', ts('Always use this Page Format with the new template?'));
     $form->assign('useSelectedPageFormat', ts('Should the new template always use the selected Page Format?'));
     $form->assign('totalSelectedContacts', count($form->_contactIds));
     CRM_Mailing_BAO_Mailing::commonLetterCompose($form);
     $buttons = array();
     if ($form->get('action') != CRM_Core_Action::VIEW) {
         $buttons[] = array('type' => 'submit', 'name' => $form->_single ? ts('Make PDF') : ts('Make PDFs'), 'isDefault' => TRUE);
     }
     $buttons[] = array('type' => 'cancel', 'name' => $form->get('action') == CRM_Core_Action::VIEW ? ts('Done') : ts('Cancel'));
     $form->addButtons($buttons);
     $form->addFormRule(array('CRM_Contact_Form_Task_PDFLetterCommon', 'formRule'), $form);
 }
开发者ID:ruchirapingale,项目名称:civicrm-core,代码行数:42,代码来源:PDFLetterCommon.php


注:本文中的CRM_Mailing_BAO_Mailing::commonLetterCompose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。