Issue #3188335: Captcha doesn't work on forms in blocks
Open
requested to merge issue/simple_recaptcha-3188335:3188335-captcha-doesnt-work-in-blocks into 8.x-1.x
1 unresolved thread
Merge request reports
Activity
added 38 commits
-
55d69737...bd9129d7 - 34 commits from branch
project:8.x-1.x
- 2d82a51f - Revert "Check for recaptcha IDs in any element."
- c9074f64 - Merge remote-tracking branch 'original/8.x-1.x' into 3188335-captcha-doesnt-work-in-blocks
- 2a448be7 - Issue 3188335 Applied solution from comment #10.
- 346f59bf - Issue 3188335 Added test from comment #5 with feedback from comment #8.
Toggle commit list-
55d69737...bd9129d7 - 34 commits from branch
added 1 commit
- 0a30cd76 - Issue 3188335 Remove double const declarations.
4 4 attach: function (context, drupalSettings) { 5 5 function recaptchaButtons(formIds) { 6 6 for(let formId in formIds) { 7 const $form = $('form[data-recaptcha-id="' + formId + '"]'); 7 8 // Find an element with the data-recaptcha-id and see if it is form. 9 // If it isn't use the closest form. 10 let $fm = $('*[data-recaptcha-id="' + formId + '"]'); 11 if ($fm[0].tagName !== 'FORM') { 12 $fm = $($fm[0].querySelector('form')); 13 } 14 const $form = $fm;
Please register or sign in to reply