Fix template checkboxes in Print PDF form
authorColeman Watts <coleman@civicrm.org>
Wed, 7 Oct 2015 18:41:55 +0000 (14:41 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 7 Oct 2015 18:41:55 +0000 (14:41 -0400)
templates/CRM/Contact/Form/Task/PDFLetterCommon.tpl

index b4be3b240740eaa8922fee8eed520186c50def6c..befe6a9df496be6da35c9c49ce32c654c84b4af4 100644 (file)
@@ -133,6 +133,12 @@ CRM.$(function($) {
   $form.closest('.ui-dialog-content.crm-ajax-container').on('dialogbeforeclose', function() {
     $(this).trigger('crmFormSuccess');
   });
+  showSaveDetails($('input[name=saveTemplate]', $form)[0]);
+
+  function showSaveTemplate() {
+    $('#updateDetails').toggle(!!$(this).val());
+  }
+  $('[name=template]', $form).each(showSaveTemplate).change(showSaveTemplate);
 });
 
 var currentWidth;