hide the Whats Up Nickname if notice title enabled

This commit is contained in:
Evan Prodromou 2010-08-13 12:22:58 -07:00
parent e6da476c16
commit 9b7536351b
2 changed files with 3 additions and 1 deletions

View File

@ -169,7 +169,8 @@ class NoticeForm extends Form
function formData()
{
if (Event::handle('StartShowNoticeFormData', array($this))) {
$this->out->element('label', array('for' => 'notice_data-text'),
$this->out->element('label', array('for' => 'notice_data-text',
'id' => 'notice_data-text-label'),
sprintf(_('What\'s up, %s?'), $this->user->nickname));
// XXX: vary by defined max size
$this->out->element('textarea', array('id' => 'notice_data-text',

View File

@ -137,6 +137,7 @@ class NoticeTitlePlugin extends Plugin
function onStartShowNoticeFormData($form)
{
$form->out->element('style', null, 'label#notice_data-text-label { display: none }');
$form->out->element('input', array('type' => 'text',
'id' => 'notice_title',
'name' => 'notice_title',