+ $this->elementEnd('fieldset');
+ $this->elementEnd('form');
+ }
+
+ if($user_im_prefs_by_transport)
+ {
+ $this->elementStart('form', array('method' => 'post',
+ 'id' => 'form_settings_im',
+ 'class' => 'form_settings',
+ 'action' =>
+ common_local_url('imsettings')));
+ $this->elementStart('fieldset', array('id' => 'settings_im_preferences'));
+ // TRANS: Header for IM preferences form.
+ $this->element('legend', null, _('IM Preferences'));
+ $this->hidden('token', common_session_token());
+ $this->elementStart('table');
+ $this->elementStart('tr');
+ foreach($user_im_prefs_by_transport as $transport=>$user_im_prefs)
+ {
+ $this->element('th', null, $transports[$transport]['display']);
+ }
+ $this->elementEnd('tr');
+ $preferences = array(
+ // TRANS: Checkbox label in IM preferences form.
+ array('name'=>'notify', 'description'=>_('Send me notices')),
+ // TRANS: Checkbox label in IM preferences form.
+ array('name'=>'updatefrompresence', 'description'=>_('Post a notice when my status changes.')),
+ // TRANS: Checkbox label in IM preferences form.
+ array('name'=>'replies', 'description'=>_('Send me replies '.
+ 'from people I\'m not subscribed to.')),
+ // TRANS: Checkbox label in IM preferences form.
+ array('name'=>'microid', 'description'=>_('Publish a MicroID'))
+ );
+ foreach($preferences as $preference)
+ {
+ $this->elementStart('tr');
+ foreach($user_im_prefs_by_transport as $transport=>$user_im_prefs)
+ {
+ $preference_name = $preference['name'];
+ $this->elementStart('td');
+ $this->checkbox($transport . '_' . $preference['name'],
+ $preference['description'],
+ $user_im_prefs->$preference_name);
+ $this->elementEnd('td');
+ }
+ $this->elementEnd('tr');
+ }
+ $this->elementEnd('table');
+ // TRANS: Button label to save IM preferences.
+ $this->submit('save', _m('BUTTON','Save'));
+ $this->elementEnd('fieldset');
+ $this->elementEnd('form');