The action URL for the accept invitation form has the invitation_token parameter.

This means that if the user makes an error accepting the invitation (e.g. he leaves the password field blank and then submits the form), he will be shown again the form with the invitation_token in the URL. This is necessary because the links in the locale dropdown use the invitation_token param to compose links that allow the user to switch locale in this form and keep the correct invitation token (otherwise the form would give an "invalid token" error after switching locale).

This fixes the error we were having: after the user made an error submitting the accept invitation form, he could no longer switch locale; if he tried, he got an "invalid invitation token" error and was redirected to the root path. The root cause of the error was that after making an error when submitting, the invitation_token was no longer part of the URL and therefore the locale change links did not include the token, which made them useless.