QnA - Add ToSelector to new question

This commit is contained in:
Zach Copley 2011-04-05 09:12:54 -07:00
parent ac24ed3dff
commit 6954cb3508
2 changed files with 14 additions and 1 deletions

View File

@ -130,10 +130,17 @@ class QnanewquestionAction extends Action
throw new ClientException(_m('Question must have a title.')); throw new ClientException(_m('Question must have a title.'));
} }
// Notice options
$options = array();
// Does the heavy-lifting for getting "To:" information
ToSelector::fillOptions($this, $options);
$saved = QnA_Question::saveNew( $saved = QnA_Question::saveNew(
$this->user->getProfile(), $this->user->getProfile(),
$this->title, $this->title,
$this->description $this->description,
$options
); );
} catch (ClientException $ce) { } catch (ClientException $ce) {
$this->error = $ce->getMessage(); $this->error = $ce->getMessage();

View File

@ -121,6 +121,12 @@ class QnanewquestionForm extends Form
$this->unli(); $this->unli();
$this->out->elementEnd('ul'); $this->out->elementEnd('ul');
$toWidget = new ToSelector(
$this->out,
common_current_user(),
null
);
$toWidget->show();
$this->out->elementEnd('fieldset'); $this->out->elementEnd('fieldset');
} }