]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/messageform.php
change controlyourself.ca to status.net
[quix0rs-gnu-social.git] / lib / messageform.php
index eca39cc064de98445961e7a7eb137d69f8707623..ea93b8cf6cbf3e8d3e54be4b294a245fb6f11d38 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * Form for posting a direct message
  *
  * 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')) {
@@ -38,11 +38,11 @@ require_once INSTALLDIR.'/lib/form.php';
  * Form for posting a direct message
  *
  * @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      HTMLOutputter
  */
@@ -85,7 +85,7 @@ class MessageForm extends Form
 
     function id()
     {
-        return 'message_form';
+        return 'form_notice';
     }
 
     /**
@@ -99,6 +99,16 @@ class MessageForm extends Form
         return common_local_url('newmessage');
     }
 
+    /**
+     * Legend of the Form
+     *
+     * @return void
+     */
+    function formLegend()
+    {
+        $this->out->element('legend', null, _('Send a direct notice'));
+    }
+
     /**
      * Data elements
      *
@@ -123,17 +133,19 @@ class MessageForm extends Form
         unset($mutual_users);
 
         $this->out->dropdown('to', _('To'), $mutual, null, false,
-                             $this->to->id);
+                             ($this->to) ? $this->to->id : null);
 
-        $this->out->elementStart('p');
-
-        $this->out->element('textarea', array('id' => 'message_content',
-                                              'cols' => 60,
-                                              'rows' => 3,
+        $this->out->element('textarea', array('id' => 'notice_data-text',
+                                              'cols' => 35,
+                                              'rows' => 4,
                                               'name' => 'content'),
                             ($this->content) ? $this->content : '');
+        $this->out->elementStart('dl', 'form_note');
+        $this->out->element('dt', null, _('Available characters'));
+        $this->out->element('dd', array('id' => 'notice_text-count'),
+                            '140');
+        $this->out->elementEnd('dl');
 
-        $this->out->elementEnd('p');
     }
 
     /**
@@ -144,9 +156,10 @@ class MessageForm extends Form
 
     function formActions()
     {
-        $this->out->element('input', array('id' => 'message_send',
+        $this->out->element('input', array('id' => 'notice_action-submit',
+                                           'class' => 'submit',
                                            'name' => 'message_send',
                                            'type' => 'submit',
                                            'value' => _('Send')));
     }
-}
\ No newline at end of file
+}