CRM-15242 - Resubmit PR #4103
authorColeman Watts <coleman@civicrm.org>
Mon, 22 Sep 2014 23:18:07 +0000 (19:18 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 22 Sep 2014 23:18:07 +0000 (19:18 -0400)
templates/CRM/Admin/Form/ScheduleReminders.tpl

index c53ee0b97c41e22576451185f074d546ca951ca4..e406e35c0830fa8e345c03f1f9f59c012dc8c915 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}