]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/unsubscribeform.php
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / lib / unsubscribeform.php
index 092369db7bbf6fb64b8344efd4276b59b416b497..3fa594b1b3424144432894f5c450f494d8a9af2e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * Form for unsubscribing from a user
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Form
- * @package   Laconica
- * @author    Evan Prodromou <evan@controlyourself.ca>
- * @author    Sarven Capadisli <csarven@controlyourself.ca>
- * @copyright 2009 Control Yourself, Inc.
+ * @package   StatusNet
+ * @author    Evan Prodromou <evan@status.net>
+ * @author    Sarven Capadisli <csarven@status.net>
+ * @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,15 +38,14 @@ require_once INSTALLDIR.'/lib/form.php';
  * Form for unsubscribing from a user
  *
  * @category Form
- * @package  Laconica
- * @author   Evan Prodromou <evan@controlyourself.ca>
- * @author   Sarven Capadisli <csarven@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Evan Prodromou <evan@status.net>
+ * @author   Sarven Capadisli <csarven@status.net>
  * @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      SubscribeForm
  */
-
 class UnsubscribeForm extends Form
 {
     /**
@@ -61,7 +60,6 @@ class UnsubscribeForm extends Form
      * @param HTMLOutputter $out     output channel
      * @param Profile       $profile profile of user to unsub from
      */
-
     function __construct($out=null, $profile=null)
     {
         parent::__construct($out);
@@ -74,7 +72,6 @@ class UnsubscribeForm extends Form
      *
      * @return int ID of the form
      */
-
     function id()
     {
         return 'unsubscribe-' . $this->profile->id;
@@ -86,10 +83,9 @@ class UnsubscribeForm extends Form
      *
      * @return string of the form class
      */
-
     function formClass()
     {
-        return 'form_user_unsubscribe';
+        return 'form_user_unsubscribe ajax';
     }
 
     /**
@@ -97,18 +93,27 @@ class UnsubscribeForm extends Form
      *
      * @return string URL of the action
      */
-
     function action()
     {
         return common_local_url('unsubscribe');
     }
 
     /**
-     * Data elements of the form
+     * Legend of the Form
      *
      * @return void
      */
+    function formLegend()
+    {
+        // TRANS: Form legend on unsubscribe form.
+        $this->out->element('legend', null, _('Unsubscribe from this user'));
+    }
 
+    /**
+     * Data elements of the form
+     *
+     * @return void
+     */
     function formData()
     {
         $this->out->hidden('unsubscribeto-' . $this->profile->id,
@@ -121,9 +126,11 @@ class UnsubscribeForm extends Form
      *
      * @return void
      */
-
     function formActions()
     {
-        $this->out->submit('submit', _('Unsubscribe'));
+        // TRANS: Button text on unsubscribe form.
+        $this->out->submit('submit', _m('BUTTON','Unsubscribe'), 'submit', null,
+                           // TRANS: Button title on unsubscribe form.
+                           _('Unsubscribe from this user.'));
     }
 }