CRM-13932 - Fix deprecated useages of .attr
authorColeman Watts <coleman@civicrm.org>
Thu, 19 Dec 2013 00:01:18 +0000 (16:01 -0800)
committerColeman Watts <coleman@civicrm.org>
Mon, 6 Jan 2014 19:10:39 +0000 (11:10 -0800)
36 files changed:
js/Common.js
templates/CRM/Campaign/Form/Gotv.tpl
templates/CRM/Campaign/Form/ResultOptions.tpl
templates/CRM/Contact/Form/Merge.tpl
templates/CRM/Contact/Form/Relationship.tpl
templates/CRM/Contact/Form/Search/Custom.tpl
templates/CRM/Contact/Form/Selector.tpl
templates/CRM/Contact/Form/ShareAddress.tpl
templates/CRM/Contribute/Form/Contribution.tpl
templates/CRM/Contribute/Form/Contribution/Main.tpl
templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl
templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl
templates/CRM/Contribute/Form/Contribution/PremiumBlock.tpl
templates/CRM/Contribute/Form/ContributionPage/Amount.tpl
templates/CRM/Core/BillingBlock.tpl
templates/CRM/Custom/Form/Group.tpl
templates/CRM/Event/Cart/Form/Checkout/Payment.tpl
templates/CRM/Event/Form/EventFees.tpl
templates/CRM/Event/Form/ManageEvent/Registration.tpl
templates/CRM/Event/Form/Participant.tpl
templates/CRM/Financial/Form/Export.tpl
templates/CRM/Mailing/Form/Schedule.tpl
templates/CRM/Mailing/Form/Search.tpl
templates/CRM/Mailing/Form/Settings.tpl
templates/CRM/Member/Form/Membership.tpl
templates/CRM/Member/Form/MembershipBlock.tpl
templates/CRM/Member/Form/MembershipRenewal.tpl
templates/CRM/Member/Form/Task/Label.js
templates/CRM/Price/Form/Calculate.tpl
templates/CRM/Price/Form/ParticipantCount.tpl
templates/CRM/Report/Form/Criteria.tpl
templates/CRM/Report/Form/Instance.tpl
templates/CRM/SMS/Form/Schedule.tpl
templates/CRM/UF/Form/Field.tpl
templates/CRM/common/additionalBlocks.tpl
templates/CRM/common/batchCopy.tpl

index 4e38c1e704f16b025de358403084c595eb95171d..0ea214729009df95ee758dbc030a030c33cc7ec3 100644 (file)
@@ -184,12 +184,8 @@ function showHideByValue(trigger_field_id, trigger_value, target_element_id, tar
  * @return
  */
 function toggleCheckboxVals(fldPrefix, object) {
-  if (object.id == 'toggleSelect' && cj(object).is(':checked')) {
-    cj('Input[id*="' + fldPrefix + '"],Input[id*="toggleSelect"]').attr('checked', true);
-  }
-  else {
-    cj('Input[id*="' + fldPrefix + '"],Input[id*="toggleSelect"]').attr('checked', false);
-  }
+  var val = (object.id == 'toggleSelect' && cj(object).is(':checked'));
+  cj('Input[id*="' + fldPrefix + '"],Input[id*="toggleSelect"]').prop('checked', val);
   // change the class of selected rows
   on_load_init_checkboxes(object.form.name);
 }
@@ -293,8 +289,8 @@ function checkPerformAction(fldPrefix, form, taskButton, selection) {
  */
 function checkSelectedBox(chkName) {
   var checkElement = cj('#' + chkName);
-  if (checkElement.attr('checked')) {
-    cj('input[value=ts_sel]:radio').attr('checked', true);
+  if (checkElement.prop('checked')) {
+    cj('input[value=ts_sel]:radio').prop('checked', true);
     checkElement.parents('tr').addClass('crm-row-selected');
   }
   else {
index f1d7166184506006117575c77915136e8e6c517e..b5c955529877a5c4dff535a94544f0a6f274de35 100755 (executable)
@@ -175,7 +175,7 @@ function processVoterData( element, operation )
   if ( operation == 'release' ) {
          data['operation']   = operation;
   data['activity_id'] = cj( element ).val( );
-  data['isDelete']    = cj( element ).attr( 'checked') ? 1:0;
+  data['isDelete']    = cj( element ).prop('checked') ? 1:0;
   } else if ( operation == 'reserve' ) {
         var interviewerId           = cj( '#survey_interviewer_id' ).val( );
         data['operation']           = operation;
@@ -183,11 +183,11 @@ function processVoterData( element, operation )
   data['target_contact_id']   = cj( element ).val( );
         data['source_contact_id']   = interviewerId;
         data['assignee_contact_id'] = interviewerId;
-  data['isReserved']          = cj( element ).attr( 'checked') ? 1:0;
+  data['isReserved']          = cj( element ).prop('checked') ? 1:0;
   } else if ( operation == 'gotv' ) {
          data['operation']   = operation;
   data['activity_id'] = cj( element ).val( );
-  data['hasVoted']    = cj( element ).attr( 'checked') ? 1: 0;
+  data['hasVoted']    = cj( element ).prop('checked') ? 1: 0;
   }
   data['surveyTitle'] = {/literal}'{$surveyTitle|escape:javascript}'{literal};
 
@@ -204,11 +204,11 @@ function processVoterData( element, operation )
        cj( msgId ).fadeIn('slow').fadeOut('slow');
        if ( operation == 'release' ) {
                  msg = '{/literal}{ts escape='js'}Save as voted.{/ts}{literal}';
-           var isDeleted = cj( element ).attr( 'checked') ? 1:0;
+           var isDeleted = cj( element ).prop('checked') ? 1:0;
            if ( !isDeleted ) msg = '{/literal}{ts escape='js'}Save as non voted.{/ts}{literal}';
        } else if ( operation == 'gotv' ) {
            msg = '{/literal}{ts escape='js'}Vote Recorded.{/ts}{literal}';
-           var hasVoted = cj( element ).attr( 'checked') ? 1:0;
+           var hasVoted = cj( element ).prop('checked') ? 1:0;
            var trObject = cj( '[id^="survey_activity['+ cj( element ).val() +']"]' ).parents('tr' );
            var methodName = 'addClass';
            if ( !hasVoted ) {
@@ -217,7 +217,7 @@ function processVoterData( element, operation )
            }
            eval( 'trObject.' + methodName + "( 'name disabled' )" );
        } else if ( operation == 'reserve' ) {
-           if ( cj( element ).attr( 'checked') ) {
+           if ( cj( element ).prop('checked') ) {
                msg = '{/literal}{ts escape='js'}Reserved.{/ts}{literal}';
            } else {
                msg = '{/literal}{ts escape='js'}Released.{/ts}{literal}';
index bcf6a9aa3b47e57b8e55c4505a3453f5c2cf4a1a..a40880a4f9e9abdd3f0d82126af1611a10d8f23a 100644 (file)
                 }
 
                 if ( result[key].is_default == 1 ) {
-                    cj('#radio'+countRows+' input').attr('checked', 'true');
+                    cj('#radio'+countRows+' input').prop('checked', true);
                 }
 
                 if ( countRows > 1 ) {
index 7bae2d328d559b12b32fce4af99f98df2115105a..b6472b416fbacda17a06b0aeacb35c2d32e23451 100644 (file)
@@ -149,25 +149,19 @@ cj(document).ready(function(){
 
        switch ( element['1'] ) {
            case 'addressee':
-                 var ele = '#' + element['0'] + '_' + element['1'];
+                 ele = '#' + element['0'] + '_' + element['1'];
                  break;
 
            case 'email':
            case 'postal':
-                 var ele = '#' + element['0'] + '_' + element['1'] + '_' + element['2'];
+                 ele = '#' + element['0'] + '_' + element['1'] + '_' + element['2'];
                  break;
        }
 
        if( ele ) {
-          cj(this).bind( 'click', function() {
-
-              if( cj( this).attr( 'checked' ) ){
-                  cj('input' + ele ).attr('checked', true );
-                  cj('input' + ele + '_custom' ).attr('checked', true );
-              } else {
-                  cj('input' + ele ).attr('checked', false );
-                  cj('input' + ele + '_custom' ).attr('checked', false );
-              }
+          cj(this).on('click', function() {
+            var val = cj(this).prop('checked');
+            cj('input' + ele + ', input' + ele + '_custom').prop('checked', val);
           });
        }
     });
index 2ff3da0cebfa52b4295d5ff507b20448f65e3166..6510367c282ba2df5eb3c484fddf173e019dae7d 100644 (file)
@@ -415,14 +415,14 @@ cj( function( ) {
 
     cj('.pagerDisplay').on('click', '.contact_select input', function () {
         var valueSelected = cj(this).val();
-        if ( cj(this).attr('checked') ) {
+        if ( cj(this).prop('checked') ) {
             contact_checked[valueSelected] =  valueSelected;
             countSelected++;
         } else if( contact_checked[valueSelected] ) {
             delete contact_checked[valueSelected];
             countSelected--;
             if ( useEmployer && employer_holdelement[valueSelected] ) {
-                cj( employer_holdelement[valueSelected] ).attr('checked',false);
+                cj( employer_holdelement[valueSelected] ).prop('checked',false);
                 delete employer_checked[valueSelected];
                 delete employer_holdelement[valueSelected];
             }
@@ -436,11 +436,11 @@ cj( function( ) {
             if ( isRadio ) {
                 employer_checked = new Array();
             }
-            if ( cj(this).attr('checked') ) {
+            if ( cj(this).prop('checked') ) {
                 // add validation to match with selected contacts
                 if( !contact_checked[valueSelected] ) {
                     cj(this).crmError({/literal}'{ts escape="js"}Current employer / Current employee should be among the selected contacts.{/ts}'{literal});
-                    cj(this).attr('checked',false);
+                    cj(this).prop('checked',false);
                 } else {
                     employer_checked[valueSelected] = valueSelected;
                     employer_holdelement[valueSelected] = this;
@@ -458,7 +458,7 @@ cj( function( ) {
 function checkSelected( ) {
     cj('.pagerDisplay tbody tr .contact_select input').each( function( ) {
         if ( contact_checked[cj(this).val()] ) {
-            cj(this).attr('checked',true);
+            cj(this).prop('checked',true);
         }
     });
 
@@ -467,7 +467,7 @@ function checkSelected( ) {
         employer_holdelement = new Array();
         cj('.pagerDisplay tbody tr .'+ employerClass +' input').each( function( ) {
             if ( employer_checked[cj(this).val()] ) {
-                cj(this).attr('checked',true);
+                cj(this).prop('checked',true);
                 employer_holdelement[cj(this).val()] = this;
             }
         });
@@ -503,7 +503,7 @@ function submitAjaxData() {
 {/literal} {if $searchRows} {literal}
 cj(".contact_select .form-checkbox").each( function( ) {
     if (this) {
-        cj(this).attr('checked',true);
+        cj(this).prop('checked',true);
     }
 });
 {/literal} {/if} {literal}
index 8c03008a2b3c9b86b99e46dfba71b219504297e3..1db46eee55b95e31f1cf47b7e5c36f93ced3a8c5 100644 (file)
@@ -171,10 +171,10 @@ function toggleContactSelection( name, qfKey, selection ){
     cj.post( Url, {  qfKey: qfKey , variableType: 'multiple' , action: 'unselect' } );
     {/literal}
     {foreach from=$rows item=row}{literal}
-      cj("#{/literal}{$row.checkbox}{literal}").removeAttr('checked');{/literal}
+      cj("#{/literal}{$row.checkbox}{literal}").prop('checked', false);{/literal}
     {/foreach}
     {literal}
-    cj("#toggleSelect").removeAttr('checked');
+    cj("#toggleSelect").prop('checked', false);
     var formName = "{/literal}{$form.formName}{literal}";
     on_load_init_checkboxes(formName);
   }
index 3fbb83db511b1d8cfb487b7db242e52ede7939bd..21a2d27d887eca99dffc16836ac07f7f221c2e11 100644 (file)
 <script type="text/javascript">
   {literal}
   cj(function($) {
-    cj("#toggleSelect, input[id^=mark_x_]").removeAttr('checked');
+    cj("#toggleSelect, input[id^=mark_x_]").prop('checked', false);
     var cids = [];
     var i = 0;
     {/literal}
       cids[i++] = "#mark_x_{$selectedContactId}";
     {/foreach}
     {literal}
-    $(cids.join(',')).attr('checked', 'checked');
+    $(cids.join(',')).prop('checked', true);
     if (cids.length > 0) {
-      $('input[name=radio_ts][value=ts_sel]').attr('checked', 'checked');
+      $('input[name=radio_ts][value=ts_sel]').prop('checked', true);
     }
     var params = {getCount: cids.length};
     countSelections(params);
@@ -196,7 +196,7 @@ function toggleContactSelection(name, qfKey, selection) {
   }
   else if (name == 'resetSel' && selection == 'reset') {
     params.variableType = 'multiple';
-    cj("#toggleSelect, input[id^=mark_x_]").removeAttr('checked');
+    cj("#toggleSelect, input[id^=mark_x_]").prop('checked', false);
   }
   else {
     params.name = name;
index 4365db6a2e81f9cb264ca3743fd18dbd324ca17b..248fd871edb773127ba64392f6a25f87880dbff4 100644 (file)
@@ -52,7 +52,7 @@
 <script type="text/javascript">
   function showHideSharedAddress( blockNo, showSelect ) {
     // based on checkbox, show or hide
-    if ( cj( '#address\\[' + blockNo + '\\]\\[use_shared_address\\]' ).attr( 'checked') ) {
+    if ( cj( '#address\\[' + blockNo + '\\]\\[use_shared_address\\]' ).prop('checked') ) {
       if ( showSelect && cj( '#shared-address-display-' + blockNo ).length == 0 ) {
         cj( '#shared-address-' + blockNo ).show( );
       }
index 7461727feba018531f6b4e9713fc6e5fc31a00d5..cb84fcf2821291ce23fc217edcf4bf506be462fe 100644 (file)
   {literal}
   <script type="text/javascript">
   function verify( ) {
-    if (cj('#is_email_receipt').attr( 'checked' )) {
+    if (cj('#is_email_receipt').prop('checked' )) {
       var ok = confirm( '{/literal}{ts escape='js'}Click OK to save this contribution record AND send a receipt to the contributor now{/ts}{literal}.' );
       if (!ok) {
         return false;
       });
 
       function checkEmailDependancies( ) {
-        if (cj('#is_email_receipt').attr( 'checked' )) {
+        if (cj('#is_email_receipt').prop('checked' )) {
           cj('#fromEmail').show( );
           cj('#receiptDate').hide( );
         }
index 84a01fea6d72731da926875198a886a100989843..9d1b101a69858717f060ed567788051b3830cbbc 100644 (file)
       //disabled auto renew settings.
     var allowAutoRenew = {/literal}'{$allowAutoRenewMembership}'{literal};
       if ( allowAutoRenew && cj("#auto_renew") ) {
-        cj("#auto_renew").attr( 'checked', false );
+        cj("#auto_renew").prop('checked', false );
         cj('#allow_auto_renew').hide( );
       }
     }
 
   {/literal}
   {if $relatedOrganizationFound and $reset}
-    cj( "#is_for_organization" ).attr( 'checked', true );
+    cj( "#is_for_organization" ).prop('checked', true );
     showOnBehalf(false);
   {elseif $onBehalfRequired}
     showOnBehalf(true);
index b4f516ea0df40802ee37baf20225bc8ab83bd96d..c08f36fb58d347bbbbe8af4023dc6e2ecb3c78da 100644 (file)
@@ -99,7 +99,7 @@ cj(function(){
         cj('#allow_auto_renew').show();
     } else if ( autoRenewOption == 2 ) {
         var autoRenew = cj("#auto_renew");
-        autoRenew.attr( 'checked',  true );
+        autoRenew.prop('checked',  true );
         autoRenew.attr( 'readonly', true );
         cj('#allow_auto_renew').show();
     }
@@ -272,7 +272,7 @@ function showHideAutoRenew( memTypeId )
   }
 
   var autoRenew = cj("#auto_renew");
-  if ( considerUserInput ) isChecked = autoRenew.attr( 'checked' );
+  if ( considerUserInput ) isChecked = autoRenew.prop('checked' );
 
   //its a normal recur contribution.
   if ( cj( "is_recur" ) &&
@@ -286,7 +286,7 @@ function showHideAutoRenew( memTypeId )
   if ( readOnly && funName == 'show();' ) isChecked = true;
 
   autoRenew.attr( 'readonly', readOnly );
-  autoRenew.attr( 'checked',  isChecked );
+  autoRenew.prop('checked',  isChecked );
   eval( "cj('#allow_auto_renew')." + funName );
 }
 
@@ -295,7 +295,7 @@ function showHideAutoRenew( memTypeId )
      //keep read only always checked.
      cj( "#auto_renew" ).click(function( ) {
         if ( cj(this).attr( 'readonly' ) ) {
-            cj(this).attr( 'checked', true );
+            cj(this).prop('checked', true );
         }
      });
   });
index 8dbc5d970033305674b2be6ece7cbe2c38ca88a2..726371eaa9815f53701a5a1d36e4dfb32e7630cd 100644 (file)
   showOnBehalf({/literal}"{$onBehalfRequired}"{literal});
 
   cj( "#mode" ).hide( );
-  cj( "#mode" ).attr( 'checked', 'checked' );
-  if ( cj( "#mode" ).attr( 'checked' ) && !{/literal}"{$reset}"{literal} ) {
+  cj( "#mode" ).prop('checked', true );
+  if ( cj( "#mode" ).prop('checked' ) && !{/literal}"{$reset}"{literal} ) {
     $text = ' {/literal}{ts escape="js"}Use existing organization{/ts}{literal} ';
     cj( "#createNewOrg" ).text( $text );
-    cj( "#mode" ).removeAttr( 'checked' );
+    cj( "#mode" ).prop('checked', false );
   }
 
 function showOnBehalf(onBehalfRequired) {
-  if ( cj( "#is_for_organization" ).attr( 'checked' ) || onBehalfRequired ) {
+  if ( cj( "#is_for_organization" ).prop('checked' ) || onBehalfRequired ) {
     var urlPath = {/literal}"{crmURL p=$urlPath h=0 q='snippet=4&onbehalf=1'}";
     urlPath += "{$urlParams}";
     {if $mode eq 'test'}
@@ -186,20 +186,20 @@ function resetValues( filter ) {
     });
   }
   cj("#select_org tr td").find( 'input[type=radio], input[type=checkbox]' ).each(function( ) {
-    cj(this).attr('checked', false);
+    cj(this).prop('checked', false);
   });
 }
 
 function createNew( ) {
-  if (cj("#mode").attr('checked')) {
+  if (cj("#mode").prop('checked')) {
     var textMessage = ' {/literal}{ts escape="js"}Use existing organization{/ts}{literal} ';
     cj("#onbehalf_organization_name").removeAttr('readonly');
-    cj("#mode").removeAttr('checked');
+    cj("#mode").prop('checked', false);
     resetValues( false );
   }
   else {
     var textMessage = ' {/literal}{ts escape="js"}Enter a new organization{/ts}{literal} ';
-    cj("#mode").attr('checked', 'checked');
+    cj("#mode").prop('checked', true);
     setOrgName( );
   }
   cj("#createNewOrg").text(textMessage);
@@ -225,12 +225,12 @@ function setLocationDetails(contactID) {
       for (var ele in data) {
         if (data[ele].type == 'Radio') {
           if (data[ele].value) {
-            cj("input[name='"+ ele +"']").filter("[value=" + data[ele].value + "]").attr('checked', 'checked');
+            cj("input[name='"+ ele +"']").filter("[value=" + data[ele].value + "]").prop('checked', true);
           }
         }
         else if (data[ele].type == 'CheckBox') {
           if (data[ele].value) {
-            cj("input[name='"+ ele +"']").attr('checked','checked');
+            cj("input[name='"+ ele +"']").prop('checked','checked');
           }
         }
         else if (data[ele].type == 'Multi-Select') {
index 78812a7f2cfeca6e73a0ee87ae03b97124a07fcd..8514d05ee196b7540b7a9b41f7db8d6126491f5a 100644 (file)
           function check_price_set(price_set_radio_buttons) {
             if (!amount) {
               cj(price_set_radio_buttons).each(function(){
-                if (cj(this).attr('checked')) {
+                if (cj(this).prop('checked')) {
                   amount = cj(this).attr('data-amount');
                   if (typeof amount !== "undefined") {
                     amount = Number(amount);
               cj(option[0]).trigger('change');
             }
             else if (cj(price_sets[amount]).attr('type') == 'checkbox') {
-               cj(price_sets[amount]).attr("checked",true);
+               cj(price_sets[amount]).prop("checked",true);
                if ((typeof totalfee !== 'undefined') && (typeof display == 'function')) {
                  if (totalfee > 0) {
                    totalfee += amount;
                 cj(option[0]).trigger('change');
               }
               else if (cj(price_sets[selected_price_set]).attr('type') == 'checkbox') {
-                cj(price_sets[selected_price_set]).attr("checked",true);
+                cj(price_sets[selected_price_set]).prop("checked",true);
                 if ((typeof totalfee !== 'undefined') && (typeof display == 'function')) {
                   if (totalfee > 0) {
                     totalfee += amount;
index d7a52a889aec0a1344173128164b71f0757a4de4..6c0756841cd8fc9460b1aeba7ec7cf2a905e8075 100644 (file)
         function checked_payment_processors() {
             var ids = [];
             cj('.crm-contribution-contributionpage-amount-form-block-payment_processor input[type="checkbox"]').each(function(){
-                if(cj(this).attr('checked')) {
+                if(cj(this).prop('checked')) {
                     var id = cj(this).attr('id').split('_')[2];
         ids.push(id);
                 }
 
   function payLater(chkbox) {
     var elementId = 'payLaterFields';
-    if (cj('#' + chkbox).attr('checked')) {
+    if (cj('#' + chkbox).prop('checked')) {
       cj('#' + elementId).show();
     } else {
       cj('#' + elementId).hide();
            } else {
                cj('#amountFields').show();
            }
-           cj("#amount_block_is_active").attr( 'checked', true );
+           cj("#amount_block_is_active").prop('checked', true );
       break;
 
       case 'is_pledge_active' :
                if ( priceSetID ) cj( "#price_set_id" ).val( '' );
              cj('#amountFields').show();
                  }
-           cj("#amount_block_is_active").attr( 'checked', true );
+           cj("#amount_block_is_active").prop('checked', true );
       break;
 
          case 'amount_block_is_active' :
         if(display) {
             cj( '#recurringContribution' ).show( );
         } else {
-            if ( cj( '#is_recur' ).attr( 'checked' ) ) {
-                cj( '#is_recur' ).removeAttr("checked");
+            if ( cj( '#is_recur' ).prop('checked' ) ) {
+                cj( '#is_recur' ).prop('checked', false);
                 cj( '#recurFields' ).hide( );
             }
             cj( '#recurringContribution' ).hide( );
index 5895644626f6b2eddb5485ed8e27a07e77687f59..9efb53a3ce3ab5379538e3ed2d97429ef34a76e2 100644 (file)
@@ -225,7 +225,7 @@ cj( function( ) {
     }
   }
   if(checked) {
-    cj('#billingcheckbox').attr('checked', 'checked');
+    cj('#billingcheckbox').prop('checked', true);
     cj('.billing_name_address-group').hide();
   }
 
@@ -237,7 +237,7 @@ cj( function( ) {
       var orig_id = input_ids[id];
 
       // if billing checkbox is active, copy other field into billing field
-      if(cj('#billingcheckbox').attr('checked')) {
+      if(cj('#billingcheckbox').prop('checked')) {
         cj(orig_id).val( cj(id).val() );
       };
     });
@@ -249,7 +249,7 @@ cj( function( ) {
       var orig_id = select_ids[id];
 
       // if billing checkbox is active, copy other field into billing field
-      if(cj('#billingcheckbox').attr('checked')) {
+      if(cj('#billingcheckbox').prop('checked')) {
         cj(orig_id+' option').removeAttr('selected');
         cj(orig_id+' option[value="'+cj(id).val()+'"]').attr('selected', 'selected');
       };
index ebeca4aa8cf0d8e7ca3b90e8d1d3603e6ee1caab..7c13b83ecb7c0621497289d383e7b15559226d81 100644 (file)
@@ -138,7 +138,7 @@ cj(function($) {
     if (!showMaxMultiple) {
       cj("tr#multiple").hide();
     }
-    else if(cj( '#is_multiple').attr('checked')) {
+    else if(cj( '#is_multiple').prop('checked')) {
       cj("tr#multiple").show();
     }
   }
index 13aef2202d5493eb61db77be4af8e1aefacb354d..2dd3e30275bc089aa2b6a380966c2e3e3ccc6eae 100644 (file)
@@ -158,7 +158,7 @@ var pay_later_sel = "input#{$form.is_pay_later.name}";
 {literal}
 cj("document").ready(function() {
   function refresh() {
-    var is_pay_later = cj(pay_later_sel).attr("checked");
+    var is_pay_later = cj(pay_later_sel).prop("checked");
     cj(".credit_card_info-group").toggle(!is_pay_later);
     cj(".pay-later-instructions").toggle(is_pay_later);
     cj("div.billingNameInfo-section .description").html(is_pay_later ? "Enter the billing address at which you can be invoiced." : "Enter the name as shown on your credit or debit card, and the billing address for this card.");
index bcd86c041a28901ad383aea024312b3ed4d57c0a..60423c019031aba60b6adb523bee150ce6a9af6d 100644 (file)
@@ -245,7 +245,7 @@ function checkEmail( ) {
        cj("#contribution_status_id").val( cStatusId );
 
        //unset value for send receipt check box.
-       cj("#send_receipt").attr( "checked", false );
+       cj("#send_receipt").prop("checked", false );
        cj("#send_confirmation_receipt").hide( );
 
        // set receive data to null.
index 4c85a3dfef4957b1ca181789ab0bf342467f7dd8..eca8e6e333ca67916134d6287ddb723cd51359a7 100644 (file)
@@ -346,7 +346,7 @@ invert              = 0
 <script type="text/javascript">
     {literal}
     cj("#is_multiple_registrations").change( function( ) {
-        if ( !cj(this).attr( 'checked') ) {
+        if ( !cj(this).prop('checked') ) {
             cj("#additional_custom_pre_id").val('');
             cj("#additional_custom_post_id").val('');
       cj(".crm-event-manage-registration-form-block-additional_custom_post_multiple").hide();
@@ -365,11 +365,11 @@ invert              = 0
 
         // Display info
         cj('.ui-notify-message .ui-notify-close').click();
-        if ( cj("#allow_same_participant_emails").attr( 'checked' ) && cj("#is_multiple_registrations").attr( 'checked' ) ) {
+        if ( cj("#allow_same_participant_emails").prop('checked' ) && cj("#is_multiple_registrations").prop('checked' ) ) {
             CRM.alert( msg1, '', 'info', {expires:0} );
-        } else if ( cj("#allow_same_participant_emails").attr( 'checked' ) && !cj("#is_multiple_registrations").attr( 'checked' ) ) {
+        } else if ( cj("#allow_same_participant_emails").prop('checked' ) && !cj("#is_multiple_registrations").prop('checked' ) ) {
             CRM.alert( msg2, '', 'info', {expires:0} );
-        } else if ( !cj("#allow_same_participant_emails").attr( 'checked' ) && cj("#is_multiple_registrations").attr( 'checked' ) ) {
+        } else if ( !cj("#allow_same_participant_emails").prop('checked' ) && cj("#is_multiple_registrations").prop('checked' ) ) {
             CRM.alert( msg3, '', 'info', {expires:0} );
         }
     }
index ca1b061d8681a4dcf88468a3ca1c7de90e647525..ad53363caee8ba8e4d2f8f6bb8f90ebf70740b46 100644 (file)
@@ -97,7 +97,7 @@
 
           case 'checkbox':
             var checkBoxValue = eleIdpart[1].split(']');
-            if ( cj(obj).attr("checked") == true &&
+            if ( cj(obj).prop("checked") == true &&
               fieldOptionsFull[eleId] &&
               fieldOptionsFull[eleId][checkBoxValue[0]]) {
               showError = true;
     notificationStatusIds = notificationStatusIds.split(',');
     if (cj.inArray(cj('select#status_id option:selected').val(), notificationStatusIds) > -1) {
       cj("#notify").show();
-      cj("#is_notify").attr('checked', true);
+      cj("#is_notify").prop('checked', true);
     }
     else {
       cj("#notify").hide();
-      cj("#is_notify").removeAttr('checked');
+      cj("#is_notify").prop('checked', false);
     }
   }
 
index b953acf59f11b3ac8517028fe167227b7e1b0d75..60269b1966e55fa15711f689e5d0c3e6f93dc048 100644 (file)
@@ -53,7 +53,7 @@
 {literal}
 <script type="text/javascript">
   cj(function(){
-    cj('input[name="export_format"]').filter('[value=IIF]').attr('checked', true);
+    cj('input[name="export_format"]').filter('[value=IIF]').prop('checked', true);
     cj('#_qf_Export_next').click(function(){
       cj(this).hide();
       cj('#_qf_Export_cancel').val('{/literal}{ts}Done{/ts}{literal}');
index 80a63cd1226cf06fe89fb47bf18e4ad1353570a0..5e9613325c57b0b0724772c27162b12891f3d251 100644 (file)
@@ -87,11 +87,11 @@ cj(function() {
 cj(function() {
    cj('#start_date_display').change( function( ) {
        if ( cj(this).val( ) ) {
-          cj('#now').attr( 'checked', false );
+          cj('#now').prop('checked', false );
        }
    });
    cj('#now').change( function( ) { 
-       if ( cj('#now').attr('checked', true ) ) {
+       if ( cj('#now').prop('checked', true ) ) {
           cj('#start_date_display').val( '' );
           cj('#start_date').val( '' );
           cj('#start_date_time').val( '' );
index e3fa925e622ad57ab39b8fbef36fb5048ad4dc86..f7630c06f4b259b4895a52895a32e7d71e686e68 100644 (file)
@@ -80,7 +80,7 @@
     var archiveOption = cj("input[name^='is_archived']:radio");
     cj('#status_unscheduled').change(function() {
       if (cj(this).prop('checked') ) {
-        archiveOption.attr('checked',false);
+        archiveOption.prop('checked',false);
         archiveOption.attr('readonly',true);
       } else {
         archiveOption.attr('readonly',false);
       }
     }).trigger('change');
     cj(".crm-search-form-block-is_archive .crm-clear-link a").click(function() {
-      archiveOption.attr('checked',false);
+      archiveOption.prop('checked',false);
       cj('#status_unscheduled').attr('readonly',false); 
     });
   });
 
   function disableDraft() {
-    cj('#status_unscheduled').attr('checked',false); 
+    cj('#status_unscheduled').prop('checked',false);
     cj('#status_unscheduled').attr('readonly',true); 
   } 
 </script>
index 4a2fe10afcbc71735397e83483b919cb4c644b16..94f49db8101786bbf486ae84ba6b9b93ec274f06 100644 (file)
@@ -34,14 +34,13 @@ cj( function($) {
       cj(this).parent().parent().hide();
     }
   });
-  if (!cj('#override_verp').attr('checked')){
+  if (!cj('#override_verp').prop('checked')){
     cj('.crm-mailing-settings-form-block-forward_replies,.crm-mailing-settings-form-block-auto_responder').hide();
   }
   cj('#override_verp').click(function(){
       cj('.crm-mailing-settings-form-block-forward_replies,.crm-mailing-settings-form-block-auto_responder').toggle();
-       if (!cj('#override_verp').attr('checked')) {
-             cj('#forward_replies').attr('checked',false);
-             cj('#auto_responder').attr('checked',false);
+       if (!cj('#override_verp').prop('checked')) {
+             cj('#forward_replies, #auto_responder').prop('checked', false);
            }
     });
 
index e4cdec27e9985f58d2f41fb07f87fabf7cb784f0..61cf3eadfd81375efd117512e085b93ffd2ab467 100644 (file)
       if ( !mode ) {
         // Offline form (mode = false) has the record_contribution checkbox
         cj('#record_contribution').click( function( ) {
-          if ( cj(this).attr('checked') ) {
+          if ( cj(this).prop('checked') ) {
             cj('#recordContribution').show( );
             setPaymentBlock( false, true);
           }
 
     function setDifferentContactBlock( ) {
       // show/hide different contact section
-      if ( cj('#is_different_contribution_contact').attr('checked') ) {
+      if ( cj('#is_different_contribution_contact').prop('checked') ) {
         cj('#record-different-contact').show();
       }
       else {
     {/literal}{if !$membershipMode}{literal}
     showHideMemberStatus();
     function showHideMemberStatus() {
-      if ( cj( "#is_override" ).attr('checked' ) ) {
+      if ( cj( "#is_override" ).prop('checked' ) ) {
         cj('#memberStatus').show( );
         cj('#memberStatus_show').hide( );
       }
         {/literal}{if $action eq 1}{literal}
           if (!checkboxEvent) {
             if (allMemberships[memType]['total_amount_numeric'] > 0) {
-              cj('#record_contribution').attr('checked','checked');
+              cj('#record_contribution').prop('checked','checked');
               cj('#recordContribution').show();
             }
             else {
-              cj('#record_contribution').removeAttr('checked');
+              cj('#record_contribution').prop('checked', false);
               cj('#recordContribution').hide();
             }
           }
       if ( allowAutoRenew || alreadyAutoRenew ) {
         cj( "#auto_renew" ).click(function( ) {
           if ( cj(this).attr( 'readonly' ) ) {
-            cj(this).attr( 'checked', true );
+            cj(this).prop('checked', true );
           }
         });
       }
       //for update lets hide it when not already recurring.
       if ( action == 2 ) {
         //user can't cancel auto renew by unchecking.
-        if ( cj("#auto_renew").attr( 'checked' ) ) {
+        if ( cj("#auto_renew").prop('checked' ) ) {
           cj("#auto_renew").attr( 'readonly', true );
         }
         else {
 
       //we don't have both required values.
       if ( !processorId || !membershipType ) {
-        cj("#auto_renew").attr( 'checked', false );
+        cj("#auto_renew").prop('checked', false );
         cj("#autoRenew").hide( );
         return;
       }
       var currentOption    = autoRenewOptions[membershipType];
 
       if ( !currentOption || !recurProcessors[processorId] ) {
-        cj("#auto_renew").attr( 'checked', false );
+        cj("#auto_renew").prop('checked', false );
         cj("#autoRenew").hide( );
         return;
       }
       if ( currentOption == 1 ) {
         cj("#autoRenew").show( );
         if ( cj("#auto_renew").attr( 'readonly' ) ) {
-          cj("#auto_renew").attr('checked', false );
+          cj("#auto_renew").prop('checked', false );
           cj("#auto_renew").removeAttr( 'readonly' );
         }
       }
       else if ( currentOption == 2 ) {
         cj("#autoRenew").show( );
-        cj("#auto_renew").attr( 'checked', true );
+        cj("#auto_renew").prop('checked', true );
         cj("#auto_renew").attr( 'readonly', true );
       }
       else {
-        cj("#auto_renew").attr( 'checked', false );
+        cj("#auto_renew").prop('checked', false );
         cj("#autoRenew").hide( );
       }
 
       //play w/ receipt option.
-      if ( cj("#auto_renew").attr( 'checked' ) ) {
+      if ( cj("#auto_renew").prop('checked' ) ) {
         cj("#notice").hide( );
-        cj("#send_receipt").attr( 'checked', false );
+        cj("#send_receipt").prop('checked', false );
         cj("#send-receipt").hide( );
       }
       else {
         cj("#send-receipt").show( );
-        if ( cj("#send_receipt").attr( 'checked' ) ) {
+        if ( cj("#send_receipt").prop('checked' ) ) {
           cj("#notice").show( );
         }
       }
 
     {literal}
     function buildReceiptANDNotice( ) {
-      if ( cj("#auto_renew").attr( 'checked' ) ) {
+      if ( cj("#auto_renew").prop('checked' ) ) {
         cj("#notice").hide( );
         cj("#send-receipt").hide( );
       }
       else {
         cj("#send-receipt").show( );
-        if ( cj("#send_receipt").attr( 'checked' ) ) {
+        if ( cj("#send_receipt").prop('checked' ) ) {
           cj("#notice").show( );
         }
       }
         cj('#autoRenew').hide();
         var autoRenew = cj("#auto_renew");
         autoRenew.removeAttr( 'readOnly' );
-        autoRenew.removeAttr( 'checked' );
+        autoRenew.prop('checked', false );
         {/literal}{/if}{literal}
         return;
       }
         cj('#autoRenew').hide();
         var autoRenew = cj("#auto_renew");
         autoRenew.removeAttr( 'readOnly' );
-        autoRenew.removeAttr( 'checked' );
+        autoRenew.prop('checked', false );
         if ( autoRenewOption == 1 ) {
           cj('#autoRenew').show();
         }
         else if ( autoRenewOption == 2 ) {
           autoRenew.attr( 'readOnly', true );
-          autoRenew.attr( 'checked',  true );
+          autoRenew.prop('checked',  true );
           cj('#autoRenew').show();
         }
         {/literal}{/if}{literal}
         if ( cj(this).attr('price') ) {
           switch( cj(this).attr('type') ) {
             case 'checkbox':
-              if ( cj(this).attr('checked') ) {
+              if ( cj(this).prop('checked') ) {
                 eval( 'var option = ' + cj(this).attr('price') ) ;
                 var ele = option[0];
                 var memTypeId = optionsMembershipTypes[ele];
               break;
 
             case 'radio':
-              if ( cj(this).attr('checked') && cj(this).val() ) {
+              if ( cj(this).prop('checked') && cj(this).val() ) {
                 var memTypeId = optionsMembershipTypes[cj(this).val()];
                 if ( memTypeId && cj.inArray(memTypeId, currentMembershipType) == -1 ) {
                   currentMembershipType[count] = memTypeId;
     }
 
   function enableAmountSection( setContributionType ) {
-    if ( !cj('#record_contribution').attr('checked') ) {
+    if ( !cj('#record_contribution').prop('checked') ) {
       cj('#record_contribution').click( );
       cj('#recordContribution').show( );
     }
index b9bd1055d49a231395d44ff4de381f68eeb5fe27..88e0e7c1cc84f229108e94fd5d17feabe7e08cc1 100644 (file)
 
     // function to show/hide membership block fields
     function showHideMembershipBlock( ) {
-      if ( cj('#member_is_active').attr('checked') ) {
+      if ( cj('#member_is_active').prop('checked') ) {
         cj('#memberFields').show();
       } else {
         cj('#memberFields').hide();
index 217fb1c763100ecb299acf7b59200b2896300b2c..554366162ad734cbc6e2772b3c83b2311b8281e4 100644 (file)
 
     cj(function () {
       cj('#record_contribution').click(function () {
-        if (cj(this).attr('checked')) {
+        if (cj(this).prop('checked')) {
           cj('#recordContribution').show();
           setPaymentBlock(true);
         }
 
       if (!checkboxEvent) {
         if (allMemberships[memType]['total_amount_numeric'] > 0) {
-          cj('#record_contribution').attr('checked', 'checked');
+          cj('#record_contribution').prop('checked', true);
           cj('#recordContribution').show();
         }
         else {
-          cj('#record_contribution').removeAttr('checked');
+          cj('#record_contribution').prop('checked', false);
           cj('#recordContribution').hide();
         }
       }
 
     function setDifferentContactBlock() {
       //get the
-      if (cj('#contribution_contact').attr('checked')) {
+      if (cj('#contribution_contact').prop('checked')) {
         cj('#record-different-contact').show();
       }
       else {
index ee774b4956ff4deb724a24273342688e1899c7aa..367ea240c988359ab00021d8a048f14dcbee3490 100644 (file)
@@ -4,8 +4,8 @@ cj(function ($) {
     if($(this).is(":checked")) {
       $('#merge_same_address').attr('disabled', true);
       $('#merge_same_household').attr('disabled', true);
-      $('#merge_same_address').attr('checked', false);
-      $('#merge_same_household').attr('checked', false);
+      $('#merge_same_address').prop('checked', false);
+      $('#merge_same_household').prop('checked', false);
     }
     else {
       $('#merge_same_address').attr('disabled', false);
@@ -14,4 +14,4 @@ cj(function ($) {
   });
 
 
-});
\ No newline at end of file
+});
index 37b8713a1abd2c54ec5db054dce30e03b9e68b85..5421ba69117b0facba810ce9a018aa06726e11bb 100644 (file)
@@ -57,7 +57,7 @@ cj("input,#priceset select,#priceset").each(function () {
     optionPart = option[1].split(optionSep);
     addprice   = parseFloat( optionPart[0] );
 
-    if( cj(this).attr('checked') ) {
+    if( cj(this).prop('checked') ) {
       totalfee   += addprice;
       price[ele] += addprice;
     }
@@ -65,7 +65,7 @@ cj("input,#priceset select,#priceset").each(function () {
     //event driven calculation of element.
     cj(this).click( function(){
 
-      if ( cj(this).attr('checked') )  {
+      if ( cj(this).prop('checked') )  {
   totalfee   += addprice;
   price[ele] += addprice;
       } else {
@@ -92,7 +92,7 @@ cj("input,#priceset select,#priceset").each(function () {
       price[ele] = 0;
     }
 
-    if( cj(this).attr('checked') ) {
+    if( cj(this).prop('checked') ) {
       totalfee   = parseFloat(totalfee) + addprice - parseFloat(price[ele]);
       price[ele] = addprice;
     }
index b19c9b02c998b1e7ce0b0ae6b6b3f885c959f5c6..6a5745e57b0119c3c303cda3260b1234ea5ea5f8 100644 (file)
                 addCount = parseInt(optionPart[1]);
       }
 
-       if( cj(this).attr('checked') ) {
+       if( cj(this).prop('checked') ) {
               pPartiCount    += addCount;
               pPartiRef[ele] += addCount;
           }
 
        cj(this).click( function(){
-        if( cj(this).attr('checked') ) {
+        if( cj(this).prop('checked') ) {
                 pPartiCount    += addCount;
                 pPartiRef[ele] += addCount;
             } else {
@@ -84,7 +84,7 @@
               pPartiRef[ele] = 0;
           }
 
-            if( cj(this).attr('checked') ) {
+            if( cj(this).prop('checked') ) {
                     pPartiCount    = parseInt(pPartiCount) + addCount - parseInt(pPartiRef[ele]);
                     pPartiRef[ele] = addCount;
                   }
index d4d1b15fa9e884cf384ad65f79e12dfbf5008798..cfbd681aa872341f3596243063bd3fc7d266ec76 100644 (file)
             cj('input[id^="order_by_section_"]').click(disPageBreak).each(disPageBreak);
             
             function disPageBreak() {
-              if (!cj(this).attr('checked')) {
+              if (!cj(this).prop('checked')) {
                 cj(this).parent('td').next('td').children('input[id^="order_by_pagebreak_"]').attr({checked: false, disabled: "disabled"});
               }
               else {
                 // clear values on hidden field, so they're not saved
                 cj('select#order_by_column_'+ i).val('');
                 cj('select#order_by_order_'+ i).val('ASC');
-                cj('input#order_by_section_'+ i).attr('checked', false);
-                cj('input#order_by_pagebreak_'+ i).attr('checked', false);
+                cj('input#order_by_section_'+ i).prop('checked', false);
+                cj('input#order_by_pagebreak_'+ i).prop('checked', false);
             }
 
             {/literal}
index b1fa6fa6e0af90d045dd47c5217f0b3a5f2c0829..366f05f64b196c481618e84a736827ec2de2390c 100644 (file)
       var formName = {/literal}"{$form.formName}"{literal};
       cj('#_qf_' + formName + '_submit_save').click (
           function(){
-              if ( cj('#is_navigation').attr('checked') && cj('#parent_id').val() == '') {
+              if ( cj('#is_navigation').prop('checked') && cj('#parent_id').val() == '') {
                   var confirmMsg = {/literal}'{ts escape="js"}You have chosen to include this report in the Navigation Menu without selecting a Parent Menu item from the dropdown. This will add the report to the top level menu bar. Are you sure you want to continue?{/ts}'{literal}
                   return confirm(confirmMsg);
               }
index 7a3189793eff00bef6650753084cafa2c9e4839e..7a973d5f53391b07aa385429ea8b5a9254c8a211 100644 (file)
@@ -84,11 +84,11 @@ cj(function() {
 cj(function() {
    cj('#start_date_display').change( function( ) { 
        if ( cj(this).val( ) ) {
-          cj('#now').attr( 'checked', false );
+          cj('#now').prop('checked', false );
        }
    });
    cj('#now').change( function( ) { 
-       if ( cj('#now').attr('checked', true ) ) {
+       if ( cj('#now').prop('checked', true ) ) {
           cj('#start_date_display').val( '' );
           cj('#start_date').val( '' );
           cj('#start_date_time').val( '' );
index 8eb895eee16b3ec51aa8993ac13f3015d266d157..97e0ea719e2d8ee9f461f14a25ecf578fc3d5642 100644 (file)
@@ -102,7 +102,7 @@ cj(function($) {
   }
   else if( $.inArray( "Search Profile", otherModule ) > -1 ){
     $('#profile_visibility').show();
-    $("#in_selector").attr('checked',true);
+    $("#in_selector").prop('checked',true);
   }
   else if( $.inArray( "Profile", otherModule ) == -1 && $.inArray( "Search Profile", otherModule ) == -1 ){
     $('#profile_visibility').hide();
@@ -182,10 +182,10 @@ function showHideSeletorSearch() {
   if (cj("#visibility").val() == "User and User Admin Only") {
     is_search.hide();
     in_selector.hide();
-    cj("#is_searchable").attr('checked',false);
+    cj("#is_searchable").prop('checked',false);
   }
   else {
-    if (!cj("#is_view").attr('checked')) {
+    if (!cj("#is_view").prop('checked')) {
       is_search.show();
     }
     var fldName = cj("#field_name_1").val();
@@ -236,7 +236,7 @@ function multiSummaryToggle(customId) {
         }
         else {
           if (cj('#is_multi_summary').is(':checked')) {
-            cj('#is_multi_summary').removeAttr('checked');
+            cj('#is_multi_summary').prop('checked', false);
           }
           cj('.crm-uf-field-form-block-is_multi').hide();
         }
@@ -245,7 +245,7 @@ function multiSummaryToggle(customId) {
   }
   else {
     if (cj('#is_multi_summary').is(':checked')) {
-      cj('#is_multi_summary').removeAttr('checked');
+      cj('#is_multi_summary').prop('checked', false);
     }
     cj('.crm-uf-field-form-block-is_multi').hide();
   }
@@ -253,9 +253,9 @@ function multiSummaryToggle(customId) {
 
 function viewOnlyShowHide() {
   var is_search = cj('#is_search_label, #is_search_html');
-  if (cj("#is_view").attr('checked')) {
+  if (cj("#is_view").prop('checked')) {
     is_search.hide();
-    cj("#is_searchable").attr('checked', false);
+    cj("#is_searchable").prop('checked', false);
   }
   else if (cj("#visibility").val() != "User and User Admin Only")  {
     is_search.show();
index af2799d0bcce31dba771bb6bd22b1713afc2c142..68bc99a31656457a1c11a86810dc5335b0f3d1fe 100644 (file)
@@ -101,27 +101,27 @@ function singleSelect( object ) {
     var execBlock  = '#' + element['0'] + '-' + block + '-html Input[id*="' + element['2'] + '"]';
 
     //element to check for checkbox
-    var elementChecked =  cj( '#' + object ).attr('checked');
+    var elementChecked =  cj( '#' + object ).prop('checked');
     if ( elementChecked ) {
         cj( execBlock ).each( function() {
             if ( cj(this).attr('id') != object ) {
-                cj(this).attr( 'checked', false );
+                cj(this).prop('checked', false );
             }
         });
     } else {
-        cj( '#' + object ).attr( 'checked', false );
+        cj( '#' + object ).prop('checked', false );
     }
 
   //check if non of elements is set Primary / Allowed to Login.
   if( cj.inArray( element['2'].slice('2'), [ 'Primary', 'Login' ] ) != -1 ) {
     primary = false;
     cj( execBlock ).each( function( ) {
-      if ( cj(this).attr( 'checked' ) ) {
+      if ( cj(this).prop('checked' ) ) {
         primary = true;
       }
     });
     if( ! primary ) {
-      cj('#' + object).attr( 'checked', true );
+      cj('#' + object).prop('checked', true );
     }
   }
 }
@@ -132,7 +132,7 @@ function removeBlock( blockName, blockId ) {
       return clearFirstBlock(blockName , blockId);
     }
 
-    if ( cj( "#"+ blockName + "_" + blockId + "_IsPrimary").attr('checked') ) {
+    if ( cj( "#"+ blockName + "_" + blockId + "_IsPrimary").prop('checked') ) {
          var primaryBlockId = 1;
         // consider next block as a primary,
         // when user delete first block
@@ -148,7 +148,7 @@ function removeBlock( blockName, blockId ) {
         }
 
         // finally sets the primary address
-        cj( '#'+ blockName + '_' + primaryBlockId + '_IsPrimary').attr('checked', true);
+        cj( '#'+ blockName + '_' + primaryBlockId + '_IsPrimary').prop('checked', true);
     }
 
     //remove the spacer for address block only.
index 5e40f94fa9c5a3d24f4ce6028c221d4bbbfe7e2d..4542eebb319b8b935b6ddf24a9a49e42c0d9502a 100644 (file)
@@ -83,7 +83,7 @@
 
       if ( firstCheckElement.length > 1 ) {
         // lets uncheck all the checkbox except first one
-        cj('.crm-copy-fields [type=checkbox][name^="field["][name*="[' + fname +']"][type=checkbox]:not([name^="field['+ firstEntityId +']['+ fname +']["])').removeAttr('checked');
+        cj('.crm-copy-fields [type=checkbox][name^="field["][name*="[' + fname +']"][type=checkbox]:not([name^="field['+ firstEntityId +']['+ fname +']["])').prop('checked', false);
 
         //here for each checkbox for first row, check if it is checked and set remaining checkboxes
         firstCheckElement.each(function() {
             var elementName = cj(this).attr('name');
             var correctIndex = elementName.split('field['+ firstEntityId +']['+ fname +'][');
             correctIndexValue = correctIndex[1].replace(']', '');
-            cj('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']['+ correctIndexValue+']"][type!=hidden]').attr('checked',true).change();
+            cj('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']['+ correctIndexValue+']"][type!=hidden]').prop('checked',true).change();
           }
         });
       }
       else {
         if ( firstCheckElement.prop('checked') ) {
-          cj('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']"][type!=hidden]').attr('checked',true).change();
+          cj('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']"][type!=hidden]').prop('checked',true).change();
         }
         else {
-          cj('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']"][type!=hidden]').removeAttr('checked').change();
+          cj('.crm-copy-fields [type=checkbox][name^="field["][name*="['+ fname +']"][type!=hidden]').prop('checked', false).change();
         }
       }
     }