示例#1
0
 /**
  * Build all the data structures needed to build the form.
  *
  * @return void
  */
 public function preProcess()
 {
     $this->skipOnHold = $this->skipDeceased = FALSE;
     parent::preProcess();
     $this->setContactIDs();
     CRM_Contact_Form_Task_PDFLetterCommon::preProcess($this);
 }
示例#2
0
文件: Batch.php 项目: ksecor/civicrm
 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     /*
      * initialize the task and row fields
      */
     parent::preProcess();
 }
示例#3
0
 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     //check for delete
     if (!CRM_Core_Permission::checkActionPermission('CiviMember', CRM_Core_Action::DELETE)) {
         CRM_Core_Error::fatal(ts('You do not have permission to access this page'));
     }
     parent::preProcess();
 }
示例#4
0
文件: Email.php 项目: hguru/224Civi
 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this);
     parent::preProcess();
     // we have all the membership ids, so now we get the contact ids
     parent::setContactIDs();
     $this->assign('single', $this->_single);
 }
示例#5
0
 /**
  * Build all the data structures needed to build the form.
  *
  * @return void
  */
 public function preProcess()
 {
     // initialize the task and row fields
     parent::preProcess();
     //get the contact read only fields to display.
     $readOnlyFields = array_merge(array('sort_name' => ts('Name')), CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'contact_autocomplete_options', TRUE, NULL, FALSE, 'name', TRUE));
     //get the read only field data.
     $returnProperties = array_fill_keys(array_keys($readOnlyFields), 1);
     $contactDetails = CRM_Contact_BAO_Contact_Utils::contactDetails($this->_memberIds, 'CiviMember', $returnProperties);
     $this->assign('contactDetails', $contactDetails);
     $this->assign('readOnlyFields', $readOnlyFields);
 }
示例#6
0
文件: Email.php 项目: bhirsch/voipdev
 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, false);
     if ($cid) {
         CRM_Contact_Form_Task_EmailCommon::preProcessSingle($this, $cid);
     } else {
         parent::preProcess();
         // we have all the contribution ids, so now we get the contact ids
         parent::setContactIDs();
     }
     $this->assign('single', $this->_single);
 }
 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     parent::preProcess();
     $rows = array();
     // display name and membership details of all selected contacts
     $memberIDs = implode(',', $this->_memberIds);
     $query = "\n    SELECT mem.start_date  as start_date,\n           mem.end_date    as end_date,\n           mem.source      as source,  \n           ct.display_name as display_name    \nFROM       civicrm_membership mem\nINNER JOIN civicrm_contact ct ON ( mem.contact_id = ct.id )     \nWHERE      mem.id IN ( {$memberIDs} )";
     $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
     while ($dao->fetch()) {
         $rows[] = array('display_name' => $dao->display_name, 'start_date' => CRM_Utils_Date::customFormat($dao->start_date), 'end_date' => CRM_Utils_Date::customFormat($dao->end_date), 'source' => $dao->source);
     }
     $this->assign('rows', $rows);
 }
示例#8
0
文件: Batch.php 项目: bhirsch/voipdev
 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     /*
      * initialize the task and row fields
      */
     parent::preProcess();
     //get the contact read only fields to display.
     require_once 'CRM/Core/BAO/Preferences.php';
     $readOnlyFields = array_merge(array('sort_name' => ts('Name')), CRM_Core_BAO_Preferences::valueOptions('contact_autocomplete_options', true, null, false, 'name', true));
     //get the read only field data.
     $returnProperties = array_fill_keys(array_keys($readOnlyFields), 1);
     require_once 'CRM/Contact/BAO/Contact/Utils.php';
     $contactDetails = CRM_Contact_BAO_Contact_Utils::contactDetails($this->_memberIds, 'CiviMember', $returnProperties);
     $this->assign('contactDetails', $contactDetails);
     $this->assign('readOnlyFields', $readOnlyFields);
 }
示例#9
0
 /**
  * Build all the data structures needed to build the form.
  *
  * @return void
  */
 public function preProcess()
 {
     // initialize the task and row fields
     parent::preProcess();
     $session = CRM_Core_Session::singleton();
     $this->_userContext = $session->readUserContext();
     CRM_Utils_System::setTitle(ts('Batch Profile Update for Membership'));
     $validate = FALSE;
     //validations
     if (count($this->_memberIds) > $this->_maxMembers) {
         CRM_Core_Session::setStatus(ts("The maximum number of members you can select for Batch update is %1. You have selected %2. Please select fewer members from your search results and try again.", array(1 => $this->_maxMembers, 2 => count($this->_memberIds))), ts('Batch Update Error'), 'error');
         $validate = TRUE;
     }
     // than redirect
     if ($validate) {
         CRM_Utils_System::redirect($this->_userContext);
     }
 }
示例#10
0
 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     /*
      * initialize the task and row fields
      */
     parent::preProcess();
     $session =& CRM_Core_Session::singleton();
     $this->_userContext = $session->readUserContext();
     CRM_Utils_System::setTitle(ts('Batch Profile Update for Membership'));
     $validate = false;
     //validations
     if (count($this->_memberIds) > $this->_maxMembers) {
         CRM_Core_Session::setStatus("The maximum number of members you can select for Batch Update is {$this->_maxMembers}. You have selected " . count($this->_memberIds) . ". Please select fewer members from your search results and try again.");
         $validate = true;
     }
     if ($validate) {
         // than redirect
         CRM_Utils_System::redirect($this->_userContext);
     }
 }
示例#11
0
 /**
  * Build all the data structures needed to build the form.
  *
  * @return void
  */
 public function preProcess()
 {
     parent::preProcess();
     $this->setContactIDs();
     CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'templates/CRM/Member/Form/Task/Label.js');
 }