Last modified: 2014-08-13 21:20:22 UTC
ConfirmEdit adds a blob of plain HTML to the template header in response to the UserCreateForm hook. It appears at the top of the form and doesn't fit with the form's layout in divs or table rows. The ACUX experiment and initial version of the Agora create account form use jQuery to restyle this into more attractive HTML lower down in the form. Meanwhile the Mobile front end parses the header HTML in PHP and builds a more attractive input field from it. Both approaches are fragile and don't work with other CAPTCHA providers. The create account form could run the proposed APICreateAccountBeforeCreate hook to get the pieces of the CAPTCHA (Gerrit change #53793 and Gerrit change #53794), but then it would have to discourage ConfirmEdit from responding to UserCreateForm hook as well. Another possibility is ConfirmEdit could run its own hook within UserCreateForm handling that supplies structured CAPTCHA data.
I like the idea of using the internal API format to build the form more generically...
As S noted on bug 47372, we should already be able to use addCaptchaAPI for this. We could perhaps add a class the CAPTCHA output, so it could be removed easily from the header (and eventually phase out the HTML injection into the header entirely).
Change 60350 abandoned by Spage: Use addCaptchaAPI to supply info to signup form Reason: I'm not working on this. https://gerrit.wikimedia.org/r/60350