diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-08-06 22:38:06 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-08-06 22:38:06 -0400 |
commit | 1c3a1360a9bde9bd916df8a2e064438d3ef600e7 (patch) | |
tree | 775668662785556b7d79209b9cc453368d04c053 /actions/subscriptions.php | |
parent | 49eb6009a54e9fd5609cce1ba7cfc9d85edff8c0 (diff) | |
parent | 7c9e12a0b8117809d559e1120b5f4f0cf578e646 (diff) |
Merge commit 'jeff-themovie/0.8.x-subsystems-enabled' into 0.8.x
Diffstat (limited to 'actions/subscriptions.php')
-rw-r--r-- | actions/subscriptions.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/actions/subscriptions.php b/actions/subscriptions.php index 42bdae10f..0724471ff 100644 --- a/actions/subscriptions.php +++ b/actions/subscriptions.php @@ -174,14 +174,26 @@ class SubscriptionsListItem extends SubscriptionListItem return; } + if (!common_config('xmpp', 'enabled') && !common_config('sms', 'enabled')) { + return; + } + $this->out->elementStart('form', array('id' => 'subedit-' . $this->profile->id, 'method' => 'post', 'class' => 'form_subscription_edit', 'action' => common_local_url('subedit'))); $this->out->hidden('token', common_session_token()); $this->out->hidden('profile', $this->profile->id); - $this->out->checkbox('jabber', _('Jabber'), $sub->jabber); - $this->out->checkbox('sms', _('SMS'), $sub->sms); + if (common_config('xmpp', 'enabled')) { + $this->out->checkbox('jabber', _('Jabber'), $sub->jabber); + } else { + $this->out->hidden('jabber', $sub->jabber); + } + if (common_config('sms', 'enabled')) { + $this->out->checkbox('sms', _('SMS'), $sub->sms); + } else { + $this->out->hidden('sms', $sub->sms); + } $this->out->submit('save', _('Save')); $this->out->elementEnd('form'); return; |