summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-20 16:14:32 -0700
committerBrion Vibber <brion@pobox.com>2010-10-20 16:14:32 -0700
commitc24f4ddfdbf00f024730c1f76e3f17e8e3999d85 (patch)
tree8e86d93a26f446df9890dfa3447e32991f51f3ac /actions
parentbcc06d05e8b0ec4ac9d91ac65e6905d02c4b43cc (diff)
Pretty up the OpenID variant of the OAuth login form a bit; change the 'Allow' button to 'Continue' so we're not confused why we get the form again after authenticating.
Diffstat (limited to 'actions')
-rw-r--r--actions/apioauthauthorize.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/actions/apioauthauthorize.php b/actions/apioauthauthorize.php
index b603dce4a..135c146e5 100644
--- a/actions/apioauthauthorize.php
+++ b/actions/apioauthauthorize.php
@@ -347,8 +347,10 @@ class ApiOauthAuthorizeAction extends Action
$this->elementEnd('li');
$this->elementEnd('ul');
+ // quickie hack
+ $button = false;
if (!common_logged_in()) {
- if (Event::handle('StartOAuthLoginForm', array($this))) {
+ if (Event::handle('StartOAuthLoginForm', array($this, &$button))) {
$this->elementStart('fieldset');
// TRANS: Fieldset legend.
$this->element('legend', null, _m('LEGEND','Account'));
@@ -365,7 +367,7 @@ class ApiOauthAuthorizeAction extends Action
$this->elementEnd('fieldset');
}
- Event::handle('EndOAuthLoginForm', array($this));
+ Event::handle('EndOAuthLoginForm', array($this, &$button));
}
$this->element('input', array('id' => 'cancel_submit',
@@ -381,7 +383,7 @@ class ApiOauthAuthorizeAction extends Action
'name' => 'allow',
'type' => 'submit',
// TRANS: Button text that when clicked will allow access to an account by an external application.
- 'value' => _m('BUTTON','Allow')));
+ 'value' => $button ? $button : _m('BUTTON','Allow')));
$this->elementEnd('fieldset');
$this->elementEnd('form');