OnBehalfOf.tpl - fix attr vs prop and trigger change
authorColeman Watts <coleman@civicrm.org>
Thu, 18 Sep 2014 01:24:47 +0000 (21:24 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 6 Oct 2014 17:40:18 +0000 (13:40 -0400)
templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl

index a42f8e3334a0c1c15f08db5653f3a935b3f3f2b3..a63e56742d093f0b8a64e9b754769296c97da984 100644 (file)
@@ -169,16 +169,15 @@ function showOnBehalf(onBehalfRequired) {
 }
 
 function resetValues() {
-  cj('input[type=text], select, textarea', "#select_org div").not('#onbehalfof_id').val('');
-  cj('input[type=radio], input[type=checkbox]', "#select_org tr td").prop('checked', false);
+  cj('input[type=text], select, textarea', "#select_org div").not('#onbehalfof_id').val('').change();
+  cj('input[type=radio], input[type=checkbox]', "#select_org tr td").prop('checked', false).change();
 }
 
 function createNew( ) {
   if (cj("#mode").prop('checked')) {
     var textMessage = ' {/literal}{ts escape="js"}Use existing organization{/ts}{literal} ';
-    cj("#onbehalf_organization_name").removeAttr('readonly');
+    cj("#onbehalf_organization_name").prop('readonly', false);
     cj("#mode").prop('checked', false);
-    cj("#mode").removeAttr('checked');
     resetValues();
   }
   else {