X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fsubscribeform.php;h=ae2a6db61cbb32b5346b08ed92b1eaa7d5cbf12c;hb=8212df3e1a132e13d2a7aed9c4f0cd1212ff44ba;hp=fccc3d3012265c6c8dd5575303211368c2e44497;hpb=8c0c085c2de89c1ff7deeabd2b4e259f32a49ea0;p=quix0rs-gnu-social.git diff --git a/lib/subscribeform.php b/lib/subscribeform.php index fccc3d3012..ae2a6db61c 100644 --- a/lib/subscribeform.php +++ b/lib/subscribeform.php @@ -1,6 +1,6 @@ . * * @category Form - * @package Laconica - * @author Evan Prodromou - * @author Sarven Capadisli - * @copyright 2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @author Sarven Capadisli + * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -38,11 +38,11 @@ require_once INSTALLDIR.'/lib/form.php'; * Form for subscribing to a user * * @category Form - * @package Laconica - * @author Evan Prodromou - * @author Sarven Capadisli + * @package StatusNet + * @author Evan Prodromou + * @author Sarven Capadisli * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * * @see UnsubscribeForm */ @@ -50,7 +50,7 @@ require_once INSTALLDIR.'/lib/form.php'; class SubscribeForm extends Form { /** - * Profile of user to nudge + * Profile of user to subscribe to */ var $profile = null; @@ -59,7 +59,7 @@ class SubscribeForm extends Form * Constructor * * @param HTMLOutputter $out output channel - * @param Profile $profile profile of user to nudge + * @param Profile $profile profile of user to subscribe to */ function __construct($out=null, $profile=null) @@ -80,6 +80,19 @@ class SubscribeForm extends Form return 'subscribe-' . $this->profile->id; } + + /** + * class of the form + * + * @return string of the form class + */ + + function formClass() + { + return 'form_user_subscribe'; + } + + /** * Action of the form * @@ -91,6 +104,17 @@ class SubscribeForm extends Form return common_local_url('subscribe'); } + + /** + * Legend of the Form + * + * @return void + */ + function formLegend() + { + $this->out->element('legend', null, _('Subscribe to this user')); + } + /** * Data elements of the form * @@ -112,6 +136,6 @@ class SubscribeForm extends Form function formActions() { - $this->out->submit('submit', _('Subscribe')); + $this->out->submit('submit', _('Subscribe'), 'submit', null, _('Subscribe to this user')); } -} \ No newline at end of file +}