CRM-15821 - Provide option to notify Personal Campaign Page "Owner" when someone...
authorNileemaJadhav <nileema.jadhav@webaccess.co.in>
Wed, 4 Feb 2015 07:09:58 +0000 (12:39 +0530)
committerNileemaJadhav <nileema.jadhav@webaccess.co.in>
Wed, 4 Feb 2015 07:09:58 +0000 (12:39 +0530)
https://issues.civicrm.org/jira/browse/CRM-15821

CRM/PCP/BAO/PCP.php
CRM/PCP/Form/Campaign.php

index 63b914f5653b2572246f9d3b49a0c07068b0000d..e0793b94db2aefc9a8231f0eb6f27db1d1f5095c 100644 (file)
@@ -403,7 +403,7 @@ WHERE pcp.id = %1 AND cc.contribution_status_id =1 AND cc.is_test = 0";
 
     //CRM-15821 - To add new option for PCP "Owner" notification
     $ownerNotifications = CRM_Core_OptionGroup::values('pcp_owner_notify');
-    $form->addRadio('owner_notify_id', ts('Owner Notification'), $ownerNotifications, NULL, '<br/>', TRUE);
+    $form->addRadio('owner_notify_id', ts('Owner Email Notification'), $ownerNotifications, NULL, '<br/>', TRUE);
 
     $form->addElement('checkbox', 'is_tellfriend_enabled', ts("Allow 'Tell a friend' functionality"), NULL, array('onclick' => "return showHideByValue('is_tellfriend_enabled',true,'tflimit','table-row','radio',false);"));
 
index d41a85154d72a1c89f1c3bb3b6331e2825fddf46..b84bae80aec248fded2363b6123037c96b23c999 100644 (file)
@@ -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])) {