CRM-14418: fix scheduled reminder UI
authoryashodha <yashodha.chaku@webaccess.co.in>
Tue, 29 Apr 2014 02:49:01 +0000 (08:19 +0530)
committeryashodha <yashodha.chaku@webaccess.co.in>
Tue, 29 Apr 2014 02:49:01 +0000 (08:19 +0530)
CRM/Admin/Form/ScheduleReminders.php
CRM/Core/BAO/ActionSchedule.php
templates/CRM/Admin/Form/ScheduleReminders.tpl

index 1c5cbb67d2247762aeae279466d594ff59fb4bce..cb962cf94438d94411163d60b841bb50fcf25d38 100644 (file)
@@ -139,6 +139,7 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form {
     $isActive = ts('Send email');
     $recordActivity = ts('Record activity for automated email');
     if ($providersCount) {
+      $this->assign('sms', $providersCount);
       $title = ts('Email or SMS');
       $isActive = ts('Send email or SMS');
       $recordActivity = ts('Record activity for automated email or SMS');
index 38b11b833dcbebc8988bcc4ddaffafb60f1c385e..17983d2ed39b9b8bd4056033b72f66924c1d51d0 100755 (executable)
@@ -282,7 +282,7 @@ class CRM_Core_BAO_ActionSchedule extends CRM_Core_DAO_ActionSchedule {
    * @access public
    */
   static function &getList($namesOnly = FALSE, $entityValue = NULL, $id = NULL) {
-    $activity_type = CRM_Core_PseudoConstant::activityType(FALSE) + CRM_Core_PseudoConstant::activityType(FALSE, TRUE);
+    $activity_type = CRM_Core_PseudoConstant::activityType(TRUE, TRUE);
     $activity_status = CRM_Core_PseudoConstant::activityStatus();
 
     $event_type = CRM_Event_PseudoConstant::eventType();
@@ -293,7 +293,6 @@ class CRM_Core_BAO_ActionSchedule extends CRM_Core_DAO_ActionSchedule {
     $auto_renew_options = CRM_Core_OptionGroup::values('auto_renew_options');
     $civicrm_membership_type = CRM_Member_PseudoConstant::membershipType();
 
-    asort($activity_type);
     $entity = array(
       'civicrm_activity' => 'Activity',
       'civicrm_participant' => 'Event',
index 16fa99a19f50d0b4ef20233835c8269f22951b57..1ef667c393ba1a51dbfaf3164fb0fc26517d1df0 100644 (file)
 
   </table>
     <div id="email">{include file="CRM/Contact/Form/Task/EmailCommon.tpl" upload=1 noAttach=1}</div>
-    <div id="sms">{include file="CRM/Contact/Form/Task/SMSCommon.tpl" upload=1 noAttach=1}</div>
+    {if $sms}<div id="sms">{include file="CRM/Contact/Form/Task/SMSCommon.tpl" upload=1 noAttach=1}</div>{/if}
   </fieldset>
 
 {include file="CRM/common/showHideByFieldValue.tpl"