summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-12-01 12:21:00 -0800
committerBrion Vibber <brion@pobox.com>2010-12-01 12:21:00 -0800
commitbc9fcaf2eb7781746908c69850e293df387c9e8d (patch)
tree75f9fdebd2a0bad949e6b1ab6ad6edcdd133cedb /plugins
parentf68d4e7d061f33cffbcf685949f3116237c23e55 (diff)
Fix for ticket #2911: Hitting enter on the "associate with current account" in OpenID flow failed due to forms being mixed together
Separating the two forms (one to create a local account, the other to attach the OpenID to an existing account) gets them working -- enter activates the appropriate default button.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/OpenID/finishopenidlogin.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins/OpenID/finishopenidlogin.php b/plugins/OpenID/finishopenidlogin.php
index b95321cab..0053a7f1d 100644
--- a/plugins/OpenID/finishopenidlogin.php
+++ b/plugins/OpenID/finishopenidlogin.php
@@ -100,8 +100,15 @@ class FinishopenidloginAction extends Action
return;
}
+ // We don't recognize this OpenID, so we're going to give the user
+ // two options, each in its own mini-form.
+ //
+ // First, they can create a new account using their OpenID auth
+ // info. The profile will be pre-populated with whatever name,
+ // email, and location we can get from the OpenID provider, so
+ // all we ask for is the license confirmation.
$this->elementStart('form', array('method' => 'post',
- 'id' => 'account_connect',
+ 'id' => 'account_create',
'class' => 'form_settings',
'action' => common_local_url('finishopenidlogin')));
$this->hidden('token', common_session_token());
@@ -141,7 +148,15 @@ class FinishopenidloginAction extends Action
// TRANS: Button label in form in which to create a new user on the site for an OpenID.
$this->submit('create', _m('BUTTON', 'Create'));
$this->elementEnd('fieldset');
+ $this->elementEnd('form');
+ // The second option is to attach this OpenID to an existing account
+ // on the local system, which they need to provide a password for.
+ $this->elementStart('form', array('method' => 'post',
+ 'id' => 'account_connect',
+ 'class' => 'form_settings',
+ 'action' => common_local_url('finishopenidlogin')));
+ $this->hidden('token', common_session_token());
$this->elementStart('fieldset', array('id' => 'form_openid_createaccount'));
$this->element('legend', null,
// TRANS: Used as form legend for form in which to connect an OpenID to an existing user on the site.