Merge pull request #6404 from eileenmcnaughton/master
[civicrm-core.git] / CRM / PCP / Form / Campaign.php
index d41a85154d72a1c89f1c3bb3b6331e2825fddf46..129965934ccfb3d3f12ab512c30062a9e432c94e 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -142,6 +142,9 @@ class CRM_PCP_Form_Campaign extends CRM_Core_Form {
     }
 
     $this->addElement('checkbox', 'is_active', ts('Active'));
+    if ($this->_context == 'dashboard') {
+      CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url('civicrm/admin/pcp', 'reset=1'));
+    }
 
     $this->addButtons(
       array(
@@ -191,7 +194,7 @@ class CRM_PCP_Form_Campaign extends CRM_Core_Form {
    */
   public function postProcess() {
     $params = $this->controller->exportValues($this->_name);
-    $checkBoxes = array('is_thermometer', 'is_honor_roll', 'is_active');
+    $checkBoxes = array('is_thermometer', 'is_honor_roll', 'is_active', 'is_notify');
 
     foreach ($checkBoxes as $key) {
       if (!isset($params[$key])) {