From: Brion Vibber Date: Wed, 26 Jan 2011 22:57:52 +0000 (-0800) Subject: Fix ticket #3016: when using non-AJAX form of the ostatus subscription initiation... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c65480fb3380adced72c92cdf6e82f34c47d15a8;hp=621a7cb36df9e3962aac7b473478c634e97e70e1;p=quix0rs-gnu-social.git Fix ticket #3016: when using non-AJAX form of the ostatus subscription initiation for non-local group joins, show the "group" field instead of a blank "user" field --- diff --git a/plugins/OStatus/actions/ostatusinit.php b/plugins/OStatus/actions/ostatusinit.php index 91c36203c8..9832f33c05 100644 --- a/plugins/OStatus/actions/ostatusinit.php +++ b/plugins/OStatus/actions/ostatusinit.php @@ -114,10 +114,15 @@ class OStatusInitAction extends Action $this->elementStart('ul', 'form_data'); $this->elementStart('li', array('id' => 'ostatus_nickname')); - // TRANS: Field label. - $this->input('nickname', _m('User nickname'), $this->nickname, - _m('Nickname of the user you want to follow.')); - $this->hidden('group', $this->group); // pass-through for magic links + if ($this->group) { + // TRANS: Field label. + $this->input('group', _m('Group nickname'), $this->group, + _m('Nickname of the group you want to join.')); + } else { + // TRANS: Field label. + $this->input('nickname', _m('User nickname'), $this->nickname, + _m('Nickname of the user you want to follow.')); + } $this->elementEnd('li'); $this->elementStart('li', array('id' => 'ostatus_profile')); // TRANS: Field label.