X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fmessageform.php;h=ea93b8cf6cbf3e8d3e54be4b294a245fb6f11d38;hb=ae883ceb9b4689f6c1dd3aecdc4a844eda7d179a;hp=eca39cc064de98445961e7a7eb137d69f8707623;hpb=12c475c101c070cbcc4c63f7b1049f6d3282b9ee;p=quix0rs-gnu-social.git diff --git a/lib/messageform.php b/lib/messageform.php index eca39cc064..ea93b8cf6c 100644 --- a/lib/messageform.php +++ b/lib/messageform.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')) { @@ -38,11 +38,11 @@ require_once INSTALLDIR.'/lib/form.php'; * Form for posting a direct message * * @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 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 +}