Making WordPress.org

Changeset 11486


Ignore:
Timestamp:
01/28/2022 06:18:33 AM (3 years ago)
Author:
dd32
Message:

Login: Attach the reCaptcha v3 results to the correct form.

There's been a few reports that registration was failing with an unsubmittable button, the only reason I can find is that reCaptcha may have been attaching to the incorrect form.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php

    r11426 r11486  
    131131                // Add the token to the "primary" form
    132132                var input = document.createElement( "input" ),
    133                     form = document.getElementsByTagName("form")[0];
     133                    form = document.getElementById( "registerform" );
     134
     135                if ( ! form ) {
     136                    form = document.querySelectorAll( "form:not(#language-switcher)" );
     137                }
    134138
    135139                input.setAttribute( "type", "hidden" );
Note: See TracChangeset for help on using the changeset viewer.