Example #1
0
 function postProcess()
 {
     //to reset quickform elements of next (pcp) page.
     if ($this->controller->getNextName('Widget') == 'PCP') {
         $this->controller->resetPage('PCP');
     }
     // get the submitted form values.
     $params = $this->controller->exportValues($this->_name);
     if ($this->_widget) {
         $params['id'] = $this->_widget->id;
     }
     $params['contribution_page_id'] = $this->_id;
     $params['is_active'] = CRM_Utils_Array::value('is_active', $params, false);
     require_once 'CRM/Contribute/DAO/Widget.php';
     $widget = new CRM_Contribute_DAO_Widget();
     $widget->copyValues($params);
     $widget->save();
     $buttonName = $this->controller->getButtonName();
     if ($buttonName = $this->_refreshButtonName) {
         return;
     }
 }
Example #2
0
 public function postProcess()
 {
     //to reset quickform elements of next (pcp) page.
     if ($this->controller->getNextName('Widget') == 'PCP') {
         $this->controller->resetPage('PCP');
     }
     // get the submitted form values.
     $params = $this->controller->exportValues($this->_name);
     if ($this->_widget) {
         $params['id'] = $this->_widget->id;
     }
     $params['contribution_page_id'] = $this->_id;
     $params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE);
     $params['url_homepage'] = 'null';
     $widget = new CRM_Contribute_DAO_Widget();
     $widget->copyValues($params);
     $widget->save();
     $buttonName = $this->controller->getButtonName();
     if ($buttonName == $this->_refreshButtonName) {
         return;
     }
     parent::endPostProcess();
 }