add toselector to poll

This commit is contained in:
Evan Prodromou 2011-04-05 11:18:35 -04:00
parent c0f63c9a69
commit 9018a118fa
2 changed files with 17 additions and 2 deletions

View File

@ -138,10 +138,19 @@ class NewPollAction extends Action
throw new ClientException(_m('Poll must have at least two options.'));
}
// Notice options; distinct from choices for the poll
$options = array();
// Does the heavy-lifting for getting "To:" information
ToSelector::fillOptions($this, $options);
$saved = Poll::saveNew($this->user->getProfile(),
$this->question,
$this->options);
$this->question,
$this->options,
$options);
} catch (ClientException $ce) {
$this->error = $ce->getMessage();
$this->showPage();

View File

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