]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/invitebuttonsection.php
Merge commit 'refs/merge-requests/41' of https://gitorious.org/social/mainline into...
[quix0rs-gnu-social.git] / lib / invitebuttonsection.php
index c10817d7a86297605e7fcb02f9e48662281b1be4..57e204cf861cfc1b6c2af3ba0ebe4087739f9fd6 100644 (file)
@@ -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;
     }
 }