From c9b6b6fce03b303df027e3580343d4e3123358b5 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 16:10:24 +0000 Subject: [PATCH 1/2] Require every "check to submit" checkbox before enabling submit The click handler only looked at the checkbox that was clicked, so with two or more required checkboxes, checking any one enabled the submit button. Evaluate all required checkboxes together, and wait for the anti-bot countdown to finish before enabling. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GjYTexmHbnYghvDQuLhfLW --- public/public.js | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/public/public.js b/public/public.js index ce60d33..3efc49b 100644 --- a/public/public.js +++ b/public/public.js @@ -222,6 +222,7 @@ jQuery(document).ready(function () { // This is a form delay to discourage robots let counter = 5; + let countdown_complete = false; let myInterval = setInterval(function () { let button = jQuery('#submit-button') @@ -230,26 +231,31 @@ jQuery(document).ready(function () { if ( counter === 0 ) { clearInterval(myInterval); - button.html( window.TRANSLATION.submit ).prop('disabled', false) - } + countdown_complete = true; + button.html( window.TRANSLATION.submit ) - // Enforce check to submit requirements - enforce_requires_check_to_submit(); + // Enforce check to submit requirements + enforce_requires_check_to_submit(); + } }, 1000); + // Only enable submit once every "check to submit" checkbox is checked function enforce_requires_check_to_submit() { + if ( !countdown_complete ) { + return; + } + let all_checked = true; jQuery('.input-checkbox').each(function () { - if (jQuery(this).data('selected') === 'check_to_submit') { - jQuery('#submit-button').prop('disabled', true); + if (jQuery(this).data('selected') === 'check_to_submit' && !jQuery(this).prop('checked')) { + all_checked = false; } }); + jQuery('#submit-button').prop('disabled', !all_checked); } - jQuery('.input-checkbox').on('click', function () { - if (jQuery(this).data('selected') === 'check_to_submit') { - jQuery('#submit-button').prop('disabled', !jQuery(this).prop('checked')); - } + jQuery('.input-checkbox').on('change', function () { + enforce_requires_check_to_submit(); }); }) From 2ea9337eb33ab652e2608f99db888d92dd996d90 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 16:13:33 +0000 Subject: [PATCH 2/2] Allow phpcodesniffer-composer-installer plugin so CI composer install works Composer 2.10 now fails 'composer install' when composer.lock predates allow-plugins and composer.json doesn't declare it. Declare the plugin and refresh the lock hash (package versions unchanged). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GjYTexmHbnYghvDQuLhfLW --- composer.json | 5 +++++ composer.lock | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 57cbc48..f9bb730 100644 --- a/composer.json +++ b/composer.json @@ -2,5 +2,10 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "*", "wp-coding-standards/wpcs": "*" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } diff --git a/composer.lock b/composer.lock index f99f709..a1df70d 100644 --- a/composer.lock +++ b/composer.lock @@ -82,12 +82,12 @@ "version": "3.5.8", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", "shasum": "" }, @@ -187,10 +187,10 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "2.0.0" + "platform": {}, + "platform-dev": {}, + "plugin-api-version": "2.6.0" }