+
+ $this->elementStart('form', array('method' => 'post',
+ 'id' => 'form_settings_openid_trustroots',
+ 'class' => 'form_settings',
+ 'action' =>
+ common_local_url('openidsettings')));
+ $this->elementStart('fieldset', array('id' => 'settings_openid_trustroots'));
+ // TRANS: Fieldset legend.
+ $this->element('legend', null, _m('OpenID Trusted Sites'));
+ $this->hidden('token', common_session_token());
+ $this->element('p', 'form_guide',
+ // TRANS: Form guide.
+ _m('The following sites are allowed to access your ' .
+ 'identity and log you in. You can remove a site from ' .
+ 'this list to deny it access to your OpenID.'));
+ $this->elementStart('ul', 'form_data');
+ $user_openid_trustroot = new User_openid_trustroot();
+ $user_openid_trustroot->user_id=$user->id;
+ if($user_openid_trustroot->find()) {
+ while($user_openid_trustroot->fetch()) {
+ $this->elementStart('li');
+ $this->element('input', array('name' => 'openid_trustroot[]',
+ 'type' => 'checkbox',
+ 'class' => 'checkbox',
+ 'value' => $user_openid_trustroot->trustroot,
+ 'id' => 'openid_trustroot_' . crc32($user_openid_trustroot->trustroot)));
+ $this->element('label', array('class'=>'checkbox', 'for' => 'openid_trustroot_' . crc32($user_openid_trustroot->trustroot)),
+ $user_openid_trustroot->trustroot);
+ $this->elementEnd('li');
+ }
+ }
+ $this->elementEnd('ul');
+ $this->element('input', array('type' => 'submit',
+ 'id' => 'settings_openid_trustroots_action-submit',
+ 'name' => 'remove_trustroots',
+ 'class' => 'submit',
+ // TRANS: Button text to remove an OpenID trustroot.
+ 'value' => _m('BUTTON','Remove')));
+ $this->elementEnd('fieldset');
+
+ $prefs = User_openid_prefs::getKV('user_id', $user->id);
+
+ $this->elementStart('fieldset');
+ $this->element('legend', null, _m('LEGEND','Preferences'));
+ $this->elementStart('ul', 'form_data');
+ $this->checkBox('hide_profile_link', "Hide OpenID links from my profile", !empty($prefs) && $prefs->hide_profile_link);
+ $this->element('input', array('type' => 'submit',
+ 'id' => 'settings_openid_prefs_save',
+ 'name' => 'save_prefs',
+ 'class' => 'submit',
+ // TRANS: Button text to save OpenID prefs
+ 'value' => _m('BUTTON','Save')));
+ $this->elementEnd('ul');
+ $this->elementEnd('fieldset');
+
+ $this->elementEnd('form');