예제 #1
0
파일: Builder.php 프로젝트: ksecor/civicrm
 public function buildQuickForm()
 {
     //get the saved search mapping id
     $mappingId = null;
     if ($this->_ssID) {
         $mappingId = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', $this->_ssID, 'mapping_id');
     }
     CRM_Core_BAO_Mapping::buildMappingForm($this, 'Search Builder', $mappingId, $this->_columnCount, $this->_blockCount);
     parent::buildQuickForm();
 }
예제 #2
0
 public function buildQuickForm()
 {
     CRM_Core_BAO_Mapping::buildMappingForm($this, 'Export', $this->_mappingId, $this->_exportColumnCount, $blockCnt = 2, $this->get('exportMode'));
     $this->addButtons(array(array('type' => 'back', 'name' => ts('Previous')), array('type' => 'next', 'name' => ts('Export'), 'spacing' => '          '), array('type' => 'done', 'icon' => 'close', 'name' => ts('Done'))));
 }
예제 #3
0
파일: Builder.php 프로젝트: hguru/224Civi
 public function buildQuickForm()
 {
     $fields = self::fields();
     // Get fields of type date
     // FIXME: This is a hack until our fields contain this meta-data
     $dateFields = array();
     foreach ($fields as $name => $field) {
         if (strpos($name, '_date') || CRM_Utils_Array::value('data_type', $field) == 'Date') {
             $dateFields[] = $name;
         }
     }
     // Add javascript
     CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'templates/CRM/Contact/Form/Search/Builder.js')->addSetting(array('searchBuilder' => array('newBlock' => $this->get('newBlock'), 'dateFields' => $dateFields, 'fieldOptions' => self::fieldOptions())));
     //get the saved search mapping id
     $mappingId = NULL;
     if ($this->_ssID) {
         $mappingId = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', $this->_ssID, 'mapping_id');
     }
     CRM_Core_BAO_Mapping::buildMappingForm($this, 'Search Builder', $mappingId, $this->_columnCount, $this->_blockCount);
     parent::buildQuickForm();
 }
예제 #4
0
 public function buildQuickForm()
 {
     require_once "CRM/Core/BAO/Mapping.php";
     CRM_Core_BAO_Mapping::buildMappingForm($this, 'Export', $this->_mappingId, $this->_exportColumnCount, $blockCnt = 2, $this->get('exportMode'));
     $this->addButtons(array(array('type' => 'back', 'name' => ts('<< Previous')), array('type' => 'next', 'name' => ts('Export >>'), 'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'), array('type' => 'done', 'name' => ts('Done'))));
 }
예제 #5
0
 /**
  * Build quick form.
  */
 public function buildQuickForm()
 {
     $fields = self::fields();
     // Get fields of type date
     // FIXME: This is a hack until our fields contain this meta-data
     $dateFields = array();
     $stringFields = array();
     $searchByLabelFields = array();
     foreach ($fields as $name => $field) {
         if (strpos($name, '_date') || CRM_Utils_Array::value('data_type', $field) == 'Date') {
             $dateFields[] = $name;
         }
         // it's necessary to know which of the fields are from string data type
         if (isset($field['type']) && $field['type'] === CRM_Utils_Type::T_STRING) {
             $stringFields[] = $name;
         }
         // it's necessary to know which of the fields are searchable by label
         if (isset($field['searchByLabel']) && $field['searchByLabel']) {
             $searchByLabelFields[] = $name;
         }
     }
     // Add javascript
     CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'templates/CRM/Contact/Form/Search/Builder.js', 1, 'html-header')->addSetting(array('searchBuilder' => array('newBlock' => $this->get('newBlock'), 'dateFields' => $dateFields, 'fieldOptions' => self::fieldOptions(), 'stringFields' => $stringFields, 'searchByLabelFields' => $searchByLabelFields, 'generalOperators' => array('' => ts('-operator-')) + CRM_Core_SelectValues::getSearchBuilderOperators(), 'stringOperators' => array('' => ts('-operator-')) + CRM_Core_SelectValues::getSearchBuilderOperators(CRM_Utils_Type::T_STRING))));
     //get the saved search mapping id
     $mappingId = NULL;
     if ($this->_ssID) {
         $mappingId = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', $this->_ssID, 'mapping_id');
     }
     CRM_Core_BAO_Mapping::buildMappingForm($this, 'Search Builder', $mappingId, $this->_columnCount, $this->_blockCount);
     parent::buildQuickForm();
 }