CRM-15563 fix - Reminder is_repeat checkbox / column value should be reset if user...
authormonishdeb <monish.deb@webaccessglobal.com>
Thu, 6 Nov 2014 12:51:58 +0000 (18:21 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Thu, 6 Nov 2014 12:51:58 +0000 (18:21 +0530)
https://issues.civicrm.org/jira/browse/CRM-15563

CRM/Admin/Form/ScheduleReminders.php

index 39c55aaed15165a597ce08726504f191ade7f81c..af3cb0986e782b4b57b028eeb95b91dd2ce08ea6 100644 (file)
@@ -366,6 +366,8 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form {
       $params[$key] = CRM_Utils_Array::value($key, $values);
     }
 
+    $params['is_repeat'] = CRM_Utils_Array::value('is_repeat', $values, 0);
+
     $moreKeys = array(
       'start_action_offset',
       'start_action_unit',
@@ -381,6 +383,7 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form {
 
     if ($absoluteDate = CRM_Utils_Array::value('absolute_date', $params)) {
       $params['absolute_date'] = CRM_Utils_Date::processDate($absoluteDate);
+      $params['is_repeat'] = 0;
       foreach ($moreKeys as $mkey) {
         $params[$mkey] = 'null';
       }
@@ -426,7 +429,6 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form {
     }
 
     $params['is_active'] = CRM_Utils_Array::value('is_active', $values, 0);
-    $params['is_repeat'] = CRM_Utils_Array::value('is_repeat', $values, 0);
 
     if (CRM_Utils_Array::value('is_repeat', $values) == 0) {
       $params['repetition_frequency_unit'] = 'null';