123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- <?php
- if (!defined('STATUSNET')) {
-
-
- exit(1);
- }
- class GroupMessageForm extends Form
- {
- var $group;
- var $content;
-
- function __construct($out, $group, $content=null)
- {
- parent::__construct($out);
- $this->group = $group;
- $this->content = $content;
- }
-
- function action()
- {
- return common_local_url('newgroupmessage',
- array('nickname' => $this->group->nickname));
- }
-
- function formLegend()
- {
- $this->out->element('legend',
- null,
-
- sprintf(_m('Message to %s'), $this->group->nickname));
- }
-
- function id()
- {
- return 'form_notice-group-message';
- }
-
- function formClass()
- {
- return 'form_notice';
- }
-
- function formData()
- {
- $this->out->element('label', array('for' => 'notice_data-text',
- 'id' => 'notice_data-text-label'),
-
- sprintf(_m('Direct message to %s'), $this->group->nickname));
- $this->out->element('textarea', array('id' => 'notice_data-text',
- 'cols' => 35,
- 'rows' => 4,
- 'name' => 'content'),
- ($this->content) ? $this->content : '');
- $contentLimit = Message::maxContent();
- if ($contentLimit > 0) {
- $this->out->elementStart('dl', 'form_note');
-
- $this->out->element('dt', null, _m('Available characters'));
- $this->out->element('dd', array('class' => 'count'),
- $contentLimit);
- $this->out->elementEnd('dl');
- }
- }
-
- function formActions()
- {
- $this->out->element('input', array('id' => 'notice_action-submit',
- 'class' => 'submit',
- 'name' => 'message_send',
- 'type' => 'submit',
-
- 'value' => _m('Send button for sending notice', 'Send')));
- }
- }
|