X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Finvitebuttonsection.php;h=57e204cf861cfc1b6c2af3ba0ebe4087739f9fd6;hb=0590f2975e6c5b26bbe6121da5c49890e035721e;hp=c10817d7a86297605e7fcb02f9e48662281b1be4;hpb=6d5b6d98b5f68d784fee736518eaaae7a26a51f6;p=quix0rs-gnu-social.git diff --git a/lib/invitebuttonsection.php b/lib/invitebuttonsection.php index c10817d7a8..57e204cf86 100644 --- a/lib/invitebuttonsection.php +++ b/lib/invitebuttonsection.php @@ -46,18 +46,39 @@ if (!defined('STATUSNET')) { */ class InviteButtonSection extends Section { + protected $buttonText; + + function __construct($out = null, $buttonText = null) + { + $this->out = $out; + if (empty($buttonText)) { + // TRANS: Default button text for inviting more users to the StatusNet instance. + $this->buttonText = _m('BUTTON', 'Invite more colleagues'); + } else { + $this->buttonText = $buttonText; + } + } + function showTitle() { return false; } + function divId() + { + return 'invite_button'; + } + function showContent() { - $this->out->element('a', - array('href' => common_local_url('invite'), - 'class' => 'invite_button'), - // TRANS: Button text for inviting more users to the StatusNet instance. - _m('BUTTON','Invite more colleagues')); + $this->out->element( + 'a', + array( + 'href' => common_local_url('invite'), + 'class' => 'invite_button' + ), + $this->buttonText + ); return false; } }