示例#1
0
 /**
  * Pre  process the form.
  *
  *
  * @return void
  */
 public function preProcess()
 {
     parent::preProcess();
     $this->_products = CRM_Contribute_PseudoConstant::products($this->_id);
     $this->_pid = CRM_Utils_Request::retrieve('pid', 'Positive', $this, FALSE, 0);
     if ($this->_pid) {
         $dao = new CRM_Contribute_DAO_PremiumsProduct();
         $dao->id = $this->_pid;
         $dao->find(TRUE);
         $temp = CRM_Contribute_PseudoConstant::products();
         $this->_products[$dao->product_id] = $temp[$dao->product_id];
     }
     //$this->_products = array_merge(array('' => '-- Select Product --') , $this->_products );
 }
示例#2
0
 /**
  * Function to set variables up before form is built
  *
  * @return void
  * @access public
  */
 public function preProcess()
 {
     //Check if there are contributions related to Contribution Page
     parent::preProcess();
     //check for delete
     if (!CRM_Core_Permission::checkActionPermission('CiviContribute', $this->_action)) {
         CRM_Core_Error::fatal(ts('You do not have permission to access this page'));
     }
     $dao = new CRM_Contribute_DAO_Contribution();
     $dao->contribution_page_id = $this->_id;
     if ($dao->find(TRUE)) {
         $this->_relatedContributions = TRUE;
         $this->assign('relatedContributions', TRUE);
     }
 }
示例#3
0
 function preProcess()
 {
     parent::preProcess();
     require_once 'CRM/Contribute/DAO/Widget.php';
     $this->_widget = new CRM_Contribute_DAO_Widget();
     $this->_widget->contribution_page_id = $this->_id;
     if (!$this->_widget->find(true)) {
         $this->_widget = null;
     } else {
         $this->assign('widget_id', $this->_widget->id);
     }
     $this->assign('id', $this->_id);
     $config =& CRM_Core_Config::singleton();
     $title = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_ContributionPage', $this->_id, 'title');
     $this->_fields = array('title' => array(ts('Title'), 'text', false, $title), 'url_logo' => array(ts('URL to Logo Image'), 'text', false, null), 'button_title' => array(ts('Button Title'), 'text', false, ts('Contribute!')), 'url_homepage' => array(ts('URL to Home Page'), 'text', false, $config->userFrameworkBaseURL));
     $this->_colorFields = array('color_title' => array(ts('Title Text Color'), 'text', false, '0x000000'), 'color_button' => array(ts('Button Color'), 'text', false, '0xCC9900'), 'color_bar' => array(ts('Progress Bar Color'), 'text', false, '0xCC9900'), 'color_main_text' => array(ts('Additional Text Color'), 'text', false, '0x000000'), 'color_main' => array(ts('Inner Background Gradient from Bottom'), 'text', false, '0x96E0E0'), 'color_main_bg' => array(ts('Inner Background Top Area'), 'text', false, '0xFFFFFF'), 'color_bg' => array(ts('Border Color'), 'text', false, '0x66CCCC'), 'color_about_link' => array(ts('About Link Color'), 'text', false, '0x336699'), 'color_homepage_link' => array(ts('Homepage Link Color'), 'text', false, '0x336699'));
 }
示例#4
0
 function preProcess()
 {
     parent::preProcess();
     $this->_widget = new CRM_Contribute_DAO_Widget();
     $this->_widget->contribution_page_id = $this->_id;
     if (!$this->_widget->find(TRUE)) {
         $this->_widget = NULL;
     } else {
         $this->assign('widget_id', $this->_widget->id);
         // check of home url is set, if set then it flash widget might be in use.
         $this->assign('showStatus', FALSE);
         if ($this->_widget->url_homepage) {
             $this->assign('showStatus', TRUE);
         }
     }
     $this->assign('cpageId', $this->_id);
     $config = CRM_Core_Config::singleton();
     $title = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_ContributionPage', $this->_id, 'title');
     $this->_fields = array('title' => array(ts('Title'), 'text', FALSE, $title), 'url_logo' => array(ts('URL to Logo Image'), 'text', FALSE, NULL), 'button_title' => array(ts('Button Title'), 'text', FALSE, ts('Contribute!')));
     $this->_colorFields = array('color_title' => array(ts('Title Text Color'), 'text', FALSE, '#2786C2'), 'color_bar' => array(ts('Progress Bar Color'), 'text', FALSE, '#FFFFFF'), 'color_main_text' => array(ts('Additional Text Color'), 'text', FALSE, '#FFFFFF'), 'color_main' => array(ts('Background Color'), 'text', FALSE, '#96C0E7'), 'color_main_bg' => array(ts('Background Color Top Area'), 'text', FALSE, '#B7E2FF'), 'color_bg' => array(ts('Border Color'), 'text', FALSE, '#96C0E7'), 'color_about_link' => array(ts('Button Link Color'), 'text', FALSE, '#556C82'), 'color_button' => array(ts('Button Background Color'), 'text', FALSE, '#FFFFFF'), 'color_homepage_link' => array(ts('Homepage Link Color'), 'text', FALSE, '#FFFFFF'));
 }
示例#5
0
文件: PCP.php 项目: ksecor/civicrm
 /**
  * Function to pre process the form
  *
  * @access public
  * @return None
  */
 function preProcess()
 {
     parent::preProcess();
 }
 /**
  * Set variables up before form is built.
  *
  * @return void
  */
 public function preProcess()
 {
     CRM_Core_Resources::singleton()->addStyleFile('org.civicrm.webtracking', 'css/web-tracking-form.css');
     parent::preProcess();
 }