Skip to content

Commit

Permalink
refs #41146. Update singleSelect checkbox handling using prop()
Browse files Browse the repository at this point in the history
  • Loading branch information
poliphilochu committed Oct 30, 2024
1 parent 43a0fc6 commit 484ed5b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/CRM/common/additionalBlocks.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ 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.
Expand All @@ -120,7 +120,7 @@ function singleSelect( object ) {
}
});
if( ! primary ) {
cj('#' + object).attr( 'checked', true );
cj('#' + object).prop( 'checked', true );
}
}
}
Expand Down

0 comments on commit 484ed5b

Please sign in to comment.