Added hook to wrap the notice form data block

This commit is contained in:
Sarven Capadisli 2009-10-05 14:17:55 +00:00
parent 2f065d687d
commit 7a33125a6c
2 changed files with 40 additions and 30 deletions

View File

@ -93,6 +93,12 @@ StartShowAside: Showing before the Aside container
EndShowAside: Showing after the Aside container
- $action: the current action
StartShowNoticeFormData: Showing before the notice form data
- $action: the current action
EndShowNoticeFormData: Showing after the notice form data
- $action: the current action
StartNoticeSave: before inserting a notice (good place for content filters)
- $notice: notice being saved (no ID or URI)

View File

@ -142,6 +142,7 @@ class NoticeForm extends Form
function formData()
{
if (Event::handle('StartShowNoticeFormData', array($this))) {
$this->out->element('label', array('for' => 'notice_data-text'),
sprintf(_('What\'s up, %s?'), $this->user->nickname));
// XXX: vary by defined max size
@ -176,6 +177,9 @@ class NoticeForm extends Form
$this->out->hidden('notice_return-to', $this->action, 'returnto');
}
$this->out->hidden('notice_in-reply-to', $this->inreplyto, 'inreplyto');
Event::handle('StartShowNoticeFormData', array($this));
}
}
/**