forked from GNUsocial/gnu-social
Make the OpenID settings page use more of HTMLOutputter functions
This commit is contained in:
parent
474c8bef0a
commit
6f61b4488e
@ -99,26 +99,17 @@ class OpenidsettingsAction extends SettingsAction
|
|||||||
// TRANS: Fieldset legend.
|
// TRANS: Fieldset legend.
|
||||||
$this->element('legend', null, _m('LEGEND','Add OpenID'));
|
$this->element('legend', null, _m('LEGEND','Add OpenID'));
|
||||||
$this->hidden('token', common_session_token());
|
$this->hidden('token', common_session_token());
|
||||||
$this->element('p', 'form_guide',
|
|
||||||
// TRANS: Form guide.
|
|
||||||
_m('If you want to add an OpenID to your account, ' .
|
|
||||||
'enter it in the box below and click "Add".'));
|
|
||||||
$this->elementStart('ul', 'form_data');
|
$this->elementStart('ul', 'form_data');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->element('label', array('for' => 'openid_url'),
|
// TRANS: Field label.
|
||||||
// TRANS: Field label.
|
$this->input('openid_url', _m('OpenID URL'), null,
|
||||||
_m('OpenID URL'));
|
// TRANS: Form guide.
|
||||||
$this->element('input', array('name' => 'openid_url',
|
_m('An OpenID URL which identifies you.'), null, true,
|
||||||
'type' => 'text',
|
array('placeholder'=>'https://example.com/you'));
|
||||||
'id' => 'openid_url'));
|
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
$this->element('input', array('type' => 'submit',
|
// TRANS: Button text for adding an OpenID URL.
|
||||||
'id' => 'settings_openid_add_action-submit',
|
$this->submit('settings_openid_add_action-submit', _m('BUTTON','Add'), 'submit', 'add');
|
||||||
'name' => 'add',
|
|
||||||
'class' => 'submit',
|
|
||||||
// TRANS: Button text for adding an OpenID URL.
|
|
||||||
'value' => _m('BUTTON','Add')));
|
|
||||||
$this->elementEnd('fieldset');
|
$this->elementEnd('fieldset');
|
||||||
$this->elementEnd('form');
|
$this->elementEnd('form');
|
||||||
}
|
}
|
||||||
@ -167,16 +158,9 @@ class OpenidsettingsAction extends SettingsAction
|
|||||||
$this->hidden('token', common_session_token());
|
$this->hidden('token', common_session_token());
|
||||||
$this->element('a', array('href' => $oid->canonical),
|
$this->element('a', array('href' => $oid->canonical),
|
||||||
$oid->display);
|
$oid->display);
|
||||||
$this->element('input', array('type' => 'hidden',
|
$this->hidden("openid_url{$idx}", $oid->canonical, 'openid_url');
|
||||||
'id' => 'openid_url'.$idx,
|
// TRANS: Button text to remove an OpenID.
|
||||||
'name' => 'openid_url',
|
$this->submit("remove{$idx}", _m('BUTTON','Remove'), 'submit remove', 'remove');
|
||||||
'value' => $oid->canonical));
|
|
||||||
$this->element('input', array('type' => 'submit',
|
|
||||||
'id' => 'remove'.$idx,
|
|
||||||
'name' => 'remove',
|
|
||||||
'class' => 'submit remove',
|
|
||||||
// TRANS: Button text to remove an OpenID.
|
|
||||||
'value' => _m('BUTTON','Remove')));
|
|
||||||
$this->elementEnd('fieldset');
|
$this->elementEnd('fieldset');
|
||||||
$this->elementEnd('form');
|
$this->elementEnd('form');
|
||||||
$idx++;
|
$idx++;
|
||||||
@ -215,12 +199,8 @@ class OpenidsettingsAction extends SettingsAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
$this->element('input', array('type' => 'submit',
|
// TRANS: Button text to remove an OpenID trustroot.
|
||||||
'id' => 'settings_openid_trustroots_action-submit',
|
$this->submit('settings_openid_trustroots_action-submit', _m('BUTTON','Remove'), 'submit', 'remove_trustroots');
|
||||||
'name' => 'remove_trustroots',
|
|
||||||
'class' => 'submit',
|
|
||||||
// TRANS: Button text to remove an OpenID trustroot.
|
|
||||||
'value' => _m('BUTTON','Remove')));
|
|
||||||
$this->elementEnd('fieldset');
|
$this->elementEnd('fieldset');
|
||||||
|
|
||||||
$prefs = User_openid_prefs::getKV('user_id', $user->id);
|
$prefs = User_openid_prefs::getKV('user_id', $user->id);
|
||||||
@ -228,13 +208,9 @@ class OpenidsettingsAction extends SettingsAction
|
|||||||
$this->elementStart('fieldset');
|
$this->elementStart('fieldset');
|
||||||
$this->element('legend', null, _m('LEGEND','Preferences'));
|
$this->element('legend', null, _m('LEGEND','Preferences'));
|
||||||
$this->elementStart('ul', 'form_data');
|
$this->elementStart('ul', 'form_data');
|
||||||
$this->checkBox('hide_profile_link', "Hide OpenID links from my profile", !empty($prefs) && $prefs->hide_profile_link);
|
$this->checkbox('hide_profile_link', "Hide OpenID links from my profile", !empty($prefs) && $prefs->hide_profile_link);
|
||||||
$this->element('input', array('type' => 'submit',
|
// TRANS: Button text to save OpenID prefs
|
||||||
'id' => 'settings_openid_prefs_save',
|
$this->submit('settings_openid_prefs_save', _m('BUTTON','Save'), 'submit', 'save_prefs');
|
||||||
'name' => 'save_prefs',
|
|
||||||
'class' => 'submit',
|
|
||||||
// TRANS: Button text to save OpenID prefs
|
|
||||||
'value' => _m('BUTTON','Save')));
|
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
$this->elementEnd('fieldset');
|
$this->elementEnd('fieldset');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user