Moved Hide summary to RecurringEntity
authorunknown <priyanka.karan26@gmail.com>
Thu, 9 Oct 2014 18:07:33 +0000 (19:07 +0100)
committerunknown <priyanka.karan26@gmail.com>
Thu, 9 Oct 2014 18:07:33 +0000 (19:07 +0100)
CRM/Core/Form/RecurringEntity.php
CRM/Event/Form/ManageEvent/Repeat.php
templates/CRM/Core/Form/RecurringEntity.tpl
templates/CRM/Event/Form/ManageEvent/Repeat.tpl

index 2bb17e8875025b4cc1376ebc4ae5df9a6a6c349d..52fe7b674243a597748a58552de47280dfd153e9 100644 (file)
@@ -139,6 +139,7 @@ class CRM_Core_Form_RecurringEntity {
   static function buildQuickForm(&$form) {
     $form->assign('currentEntityId', self::$_entityId);
     $form->assign('entityType', self::$_entityType);
+    $form->assign('scheduleReminderId', self::$_scheduleReminderID);
     
     $form->_freqUnits = array('hour' => 'hour') + CRM_Core_OptionGroup::values('recur_frequency_units');
     foreach ($form->_freqUnits as $val => $label) {
index 7663575bdff39bac63ef37bbce9a2627b3a717e6..47066793401b0f43717a31eb20e30103aa290440 100644 (file)
@@ -36,7 +36,6 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent {
      * Get connected event information list
      */
       //Get all connected event ids
-      //$allEventIds = CRM_Core_Form_RecurringEntity::getAllConnectedEvents($checkParentExistsForThisId);
       $allEventIdsArray = CRM_Core_BAO_RecurringEntity::getEntitiesForParent($checkParentExistsForThisId, 'civicrm_event');
       $allEventIds = array();
       if (!empty($allEventIdsArray)) {
@@ -65,12 +64,6 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent {
       }
     }
 
-    //FIX ME : For summary
-    //Assign this to hide summary
-//    if (property_exists($this->_scheduleReminderDetails, 'id')) {
-//      $this->assign('scheduleReminderId', $this->_scheduleReminderDetails->id);
-//    }
-
     $parentEventParams = array('id' => $this->_id);
     $parentEventValues = array();
     $parentEventReturnProperties = array('start_date', 'end_date');
index 1c5432a3ba25748813923b215b3c32cb02199a1f..81977b966e0b292d8f2958316c1a71e6589b4c1b 100644 (file)
   }
 </script>
 {/literal}  
+{*Hide Summary*}
+{if empty($scheduleReminderId)}
+    {literal}
+        <script type="text/javascript">
+        cj(document).ready(function() {
+            if (cj('#rec-summary').length) {
+                cj('#rec-summary').parent().parent().hide();
+            }
+        });
+        </script>
+    {/literal}
+{/if}
\ No newline at end of file
index cdda3f0ac3c99c88b960a6f8b9eecaea1495a475..9aecbc7feab3642def4a70b6c3b1e21a93bb5d33 100644 (file)
   </div>
 </div>
 {/if}
-</div>
-{*Hide Summary*}
-{if empty($scheduleReminderId)}
-    {literal}
-        <script type="text/javascript">
-        cj(document).ready(function() {
-            if (cj('#rec-summary').length) {
-                cj('#rec-summary').parent().parent().hide();
-            }
-        });
-        </script>
-    {/literal}
-{/if}
\ No newline at end of file
+</div>
\ No newline at end of file