summaryrefslogtreecommitdiff
path: root/lib/noticeform.php
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-05-26 21:20:04 -0400
committerRobin Millette <millette@controlyourself.ca>2009-05-26 21:20:04 -0400
commitaf700ea27703bbec5aa1078a84f9fd44c0260322 (patch)
treea227167390948f5791b8190435fbb9cfdbd0bc38 /lib/noticeform.php
parent4edb1c6e0cfcaee256757ed20b4ff8d482158906 (diff)
Let's you upload a file with a notice and have it shown with other attachments.
Diffstat (limited to 'lib/noticeform.php')
-rw-r--r--lib/noticeform.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/noticeform.php b/lib/noticeform.php
index 606b5d028..707768cd5 100644
--- a/lib/noticeform.php
+++ b/lib/noticeform.php
@@ -89,7 +89,8 @@ class NoticeForm extends Form
} else {
$this->user = common_current_user();
}
-
+
+ $this->enctype = 'multipart/form-data';
}
/**
@@ -136,18 +137,25 @@ class NoticeForm extends Form
{
$this->out->element('label', array('for' => 'notice_data-text'),
sprintf(_('What\'s up, %s?'), $this->user->nickname));
+ $this->out->elementStart('span', array('style' => 'float: right; margin-top: 2em;'));
+// $this->out->element('a', array('href' => '#attach'), ' [ATTACH]');
+ $this->out->elementEnd('span');
// XXX: vary by defined max size
$this->out->element('textarea', array('id' => 'notice_data-text',
'cols' => 35,
'rows' => 4,
'name' => 'status_textarea'),
($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->element('br', array('style' => 'clear:both'));
+// $this->out->elementStart('a', array('href' => '#'));
+ $this->out->element('label', array('for' => 'notice_data-attach'), _('Upload: '));
+// $this->out->elementEnd('a');
+ $this->out->element('input', array('id' => 'notice_data-attach', 'type' => 'file', 'name' => 'attach'));
if ($this->action) {
$this->out->hidden('notice_return-to', $this->action, 'returnto');