CRM-15242 - Fix scheduleReminder 'limit to' option
authorColeman Watts <coleman@civicrm.org>
Thu, 11 Sep 2014 23:41:19 +0000 (19:41 -0400)
committerColeman Watts <coleman@civicrm.org>
Thu, 11 Sep 2014 23:41:19 +0000 (19:41 -0400)
templates/CRM/Admin/Form/ScheduleReminders.tpl

index f5a89b436042b668a16f49d807d40f2e3ef1fc06..3434c008665ea23b08f6f7e02b66b9bb62854035 100644 (file)
         $('#relativeDate, #relativeDateRepeat, #repeatFields', $form).hide();
       }
 
-      $('#entity_0', $form).change(buildSelects);
+      $('#entity_0', $form).change(buildSelects).change(showHideLimitTo);
 
       loadMsgBox();
       $('#mode', $form).change(loadMsgBox);
           $('#is_recipient_listing', $form).val('');
         }
       }
+      // CRM-14070 Hide limit-to when entity is activity
+      function showHideLimitTo() {
+        $('#limit_to', $form).toggle(!($('#entity_0', $form).val() == '1'));
+      }
     });
 
   function loadMsgBox() {
       }
   }
 
-  function showHideLimitTo() {
-    if (cj('#entity_0').val() == 1) {
-      cj('#limit_to').hide();
-    }
-    else {
-      cj('#limit_to').show();
-    }
-  }
-
  </script>
  {/literal}