summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-10-05 14:42:11 +0000
committerSarven Capadisli <csarven@status.net>2009-10-05 14:42:11 +0000
commit7b4d138946d76200ce1c7c20e85e67538be5bf10 (patch)
treeb0fb9bb0ef938d96763f8fbf77781371e8b3740d /plugins
parentd6600b0007c9e093b717e83796967b27028bc641 (diff)
Init showNoticeFormData
Diffstat (limited to 'plugins')
-rw-r--r--plugins/MobileProfile/MobileProfilePlugin.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php
index 79b080b03..21eaa124e 100644
--- a/plugins/MobileProfile/MobileProfilePlugin.php
+++ b/plugins/MobileProfile/MobileProfilePlugin.php
@@ -291,6 +291,45 @@ class MobileProfilePlugin extends WAP20Plugin
}
+ function onStartShowNoticeFormData($form)
+ {
+ if (!$this->serveMobile) {
+ return true;
+ }
+
+ $form->out->element('textarea', array('id' => 'notice_data-text',
+ 'cols' => 35,
+ 'rows' => 4,
+ 'name' => 'status_textarea'),
+ ($form->content) ? $form->content : '');
+
+ $contentLimit = Notice::maxContent();
+
+ $form->out->element('script', array('type' => 'text/javascript'),
+ 'maxLength = ' . $contentLimit . ';');
+
+ if ($contentLimit > 0) {
+ $form->out->element('div', array('id' => 'notice_text-count'),
+ $contentLimit);
+ }
+
+ if (common_config('attachments', 'uploads')) {
+ $form->out->element('label', array('for' => 'notice_data-attach'),_('Attach'));
+ $form->out->element('input', array('id' => 'notice_data-attach',
+ 'type' => 'file',
+ 'name' => 'attach',
+ 'title' => _('Attach a file')));
+ $form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
+ }
+ if ($form->action) {
+ $form->out->hidden('notice_return-to', $form->action, 'returnto');
+ }
+ $form->out->hidden('notice_in-reply-to', $form->inreplyto, 'inreplyto');
+
+ return false;
+ }
+
+
function onStartShowAside($action)
{
if ($this->serveMobile) {