3 if (!defined('GNUSOCIAL')) { exit(1); }
5 class SubscriptionsListItem extends SubscriptionListItem
7 function showOwnerControls()
9 $sub = Subscription::pkeyGet(array('subscriber' => $this->owner->id,
10 'subscribed' => $this->profile->id));
15 $transports = array();
16 Event::handle('GetImTransports', array(&$transports));
17 if (!$transports && !common_config('sms', 'enabled')) {
21 $this->out->elementStart('form', array('id' => 'subedit-' . $this->profile->id,
23 'class' => 'form_subscription_edit',
24 'action' => common_local_url('subedit')));
25 $this->out->hidden('token', common_session_token());
26 $this->out->hidden('profile', $this->profile->id);
28 $attrs = array('name' => 'jabber',
30 'class' => 'checkbox',
31 'id' => 'jabber-'.$this->profile->id);
33 $attrs['checked'] = 'checked';
36 $this->out->element('input', $attrs);
37 // TRANS: Checkbox label for enabling IM messages for a profile in a subscriptions list.
38 $this->out->element('label', array('for' => 'jabber-'.$this->profile->id), _m('LABEL','IM'));
40 $this->out->hidden('jabber', $sub->jabber);
42 if (common_config('sms', 'enabled')) {
43 $attrs = array('name' => 'sms',
45 'class' => 'checkbox',
46 'id' => 'sms-'.$this->profile->id);
48 $attrs['checked'] = 'checked';
51 $this->out->element('input', $attrs);
52 // TRANS: Checkbox label for enabling SMS messages for a profile in a subscriptions list.
53 $this->out->element('label', array('for' => 'sms-'.$this->profile->id), _('SMS'));
55 $this->out->hidden('sms', $sub->sms);
57 // TRANS: Save button for settings for a profile in a subscriptions list.
58 $this->out->submit('save', _m('BUTTON','Save'));
59 $this->out->elementEnd('form');