Updated apioauthauthorize markup and styles
This commit is contained in:
parent
9f3c47ccb4
commit
18533f5b15
|
@ -273,27 +273,6 @@ class ApiOauthAuthorizeAction extends ApiOauthAction
|
||||||
return _('An application would like to connect to your account');
|
return _('An application would like to connect to your account');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Show page notice
|
|
||||||
*
|
|
||||||
* Display a notice for how to use the page, or the
|
|
||||||
* error if it exists.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
|
|
||||||
function showPageNotice()
|
|
||||||
{
|
|
||||||
if ($this->error) {
|
|
||||||
$this->element('p', 'error', $this->error);
|
|
||||||
} else {
|
|
||||||
$instr = $this->getInstructions();
|
|
||||||
$output = common_markup_to_html($instr);
|
|
||||||
|
|
||||||
$this->raw($output);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows the authorization form.
|
* Shows the authorization form.
|
||||||
*
|
*
|
||||||
|
@ -303,40 +282,38 @@ class ApiOauthAuthorizeAction extends ApiOauthAction
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$this->elementStart('form', array('method' => 'post',
|
$this->elementStart('form', array('method' => 'post',
|
||||||
'id' => 'form_login',
|
'id' => 'form_apioauthauthorize',
|
||||||
'class' => 'form_settings',
|
'class' => 'form_settings',
|
||||||
'action' => common_local_url('apioauthauthorize')));
|
'action' => common_local_url('apioauthauthorize')));
|
||||||
|
$this->elementStart('fieldset');
|
||||||
|
$this->element('legend', array('id' => 'apioauthauthorize_allowdeny'),
|
||||||
|
_('Allow or deny access'));
|
||||||
|
|
||||||
$this->hidden('token', common_session_token());
|
$this->hidden('token', common_session_token());
|
||||||
$this->hidden('oauth_token', $this->oauth_token);
|
$this->hidden('oauth_token', $this->oauth_token);
|
||||||
$this->hidden('oauth_callback', $this->callback);
|
$this->hidden('oauth_callback', $this->callback);
|
||||||
|
|
||||||
$this->elementStart('fieldset');
|
$this->elementStart('ul', 'form_data');
|
||||||
|
|
||||||
$this->elementStart('ul');
|
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
|
$this->elementStart('p');
|
||||||
if (!empty($this->app->icon)) {
|
if (!empty($this->app->icon)) {
|
||||||
$this->element('img', array('src' => $this->app->icon));
|
$this->element('img', array('src' => $this->app->icon));
|
||||||
}
|
}
|
||||||
$this->elementEnd('li');
|
|
||||||
$this->elementStart('li');
|
|
||||||
|
|
||||||
$access = ($this->app->access_type & Oauth_application::$writeAccess) ?
|
$access = ($this->app->access_type & Oauth_application::$writeAccess) ?
|
||||||
'access and update' : 'access';
|
'access and update' : 'access';
|
||||||
|
|
||||||
$msg = _("The application <b>%s</b> by <b>%s</b> would like " .
|
$msg = _("The application <strong>%s</strong> by <strong>%s</strong> would like " .
|
||||||
"the ability to <b>%s</b> your account data.");
|
"the ability to <strong>%s</strong> your account data.");
|
||||||
|
|
||||||
$this->raw(sprintf($msg,
|
$this->raw(sprintf($msg,
|
||||||
$this->app->name,
|
$this->app->name,
|
||||||
$this->app->organization,
|
$this->app->organization,
|
||||||
$access));
|
$access));
|
||||||
|
$this->elementEnd('p');
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
|
|
||||||
$this->elementEnd('fieldset');
|
|
||||||
|
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
|
|
||||||
$this->elementStart('fieldset');
|
$this->elementStart('fieldset');
|
||||||
|
@ -355,17 +332,18 @@ class ApiOauthAuthorizeAction extends ApiOauthAction
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->element('input', array('id' => 'deny_submit',
|
$this->element('input', array('id' => 'deny_submit',
|
||||||
'class' => 'submit',
|
'class' => 'submit submit form_action-primary',
|
||||||
'name' => 'deny',
|
'name' => 'deny',
|
||||||
'type' => 'submit',
|
'type' => 'submit',
|
||||||
'value' => _('Deny')));
|
'value' => _('Deny')));
|
||||||
|
|
||||||
$this->element('input', array('id' => 'allow_submit',
|
$this->element('input', array('id' => 'allow_submit',
|
||||||
'class' => 'submit',
|
'class' => 'submit submit form_action-secondary',
|
||||||
'name' => 'allow',
|
'name' => 'allow',
|
||||||
'type' => 'submit',
|
'type' => 'submit',
|
||||||
'value' => _('Allow')));
|
'value' => _('Allow')));
|
||||||
|
|
||||||
|
$this->elementEnd('fieldset');
|
||||||
$this->elementEnd('form');
|
$this->elementEnd('form');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,8 @@ font-weight:bold;
|
||||||
#form_password_recover legend,
|
#form_password_recover legend,
|
||||||
#form_password_change legend,
|
#form_password_change legend,
|
||||||
.form_entity_block legend,
|
.form_entity_block legend,
|
||||||
#form_filter_bytag legend {
|
#form_filter_bytag legend,
|
||||||
|
#apioauthauthorize_allowdeny {
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -905,10 +906,15 @@ list-style-type:none;
|
||||||
}
|
}
|
||||||
.application img,
|
.application img,
|
||||||
#showapplication .entity_profile img,
|
#showapplication .entity_profile img,
|
||||||
#editapplication .form_data #application_icon img {
|
#editapplication .form_data #application_icon,
|
||||||
|
#apioauthauthorize .form_data img {
|
||||||
max-width:96px;
|
max-width:96px;
|
||||||
max-height:96px;
|
max-height:96px;
|
||||||
}
|
}
|
||||||
|
#apioauthauthorize .form_data img {
|
||||||
|
margin-right:18px;
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
#showapplication .entity_profile {
|
#showapplication .entity_profile {
|
||||||
width:68%;
|
width:68%;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user