Skip to content

Commit

Permalink
Set default maximum image selection
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Oct 1, 2024
1 parent f6a1ff6 commit 5c26dd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/ppom.inputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ function ppom_init_js_for_ppom_fields(ppom_fields) {
const siblings = Array.from(input.parentNode.parentNode.querySelectorAll('input.ppom-input.image'));
siblings.filter(sibling => sibling !== input).forEach(sibling => sibling.checked = false);
} else {
const maxImgSelection = parseInt( input.dataset?.maxSelection ?? '0' );
const maxImgSelection = parseInt( input.dataset?.maxSelection ?? '1' );
if ( maxImgSelection ) {
inputContainer.querySelector('img')?.addEventListener( 'click', () => {
selectedImgs.push( input );
Expand Down

0 comments on commit 5c26dd9

Please sign in to comment.