forked from GNUsocial/gnu-social
QnA - Add ToSelector to new question
This commit is contained in:
parent
ac24ed3dff
commit
6954cb3508
@ -130,10 +130,17 @@ class QnanewquestionAction extends Action
|
||||
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(
|
||||
$this->user->getProfile(),
|
||||
$this->title,
|
||||
$this->description
|
||||
$this->description,
|
||||
$options
|
||||
);
|
||||
} catch (ClientException $ce) {
|
||||
$this->error = $ce->getMessage();
|
||||
|
@ -121,6 +121,12 @@ class QnanewquestionForm extends Form
|
||||
$this->unli();
|
||||
|
||||
$this->out->elementEnd('ul');
|
||||
$toWidget = new ToSelector(
|
||||
$this->out,
|
||||
common_current_user(),
|
||||
null
|
||||
);
|
||||
$toWidget->show();
|
||||
$this->out->elementEnd('fieldset');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user