Fix breakages with reCAPTCHA-enabled account registration.
Review Request #7967 — Created Feb. 16, 2016 and submitted
There were two issues causing account registration to fail when using reCAPTCHA. The first is that the constructor for the mixin wasn't passing in the request to the parent constructor, which meant that the registration form couldn't get to it. This prevented the attribute from being set, later breaking the form. Turns out we didn't even need this parameter, so we now just let it stay in kwargs. The second issue is that there was no validation covering the case where the user didn't click "I'm not a robot." This led to a KeyError, which broke the page. That condition is now checked, and a validation error message returned.
Tested with and without using reCAPTCHA.
I was able to register an account with reCAPTCHA enabled and the
"I'm not a robot" checked.When leaving it unchecked, I saw an appropriate validation error
message at the top of the form.