Add two-step set test start form
This commit is contained in:
@@ -13,6 +13,7 @@ class HtmlView extends BaseHtmlView
|
||||
protected $items;
|
||||
protected $sets;
|
||||
protected $results;
|
||||
protected $started;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
@@ -23,6 +24,10 @@ class HtmlView extends BaseHtmlView
|
||||
$this->set = $this->get('Set');
|
||||
$this->items = $this->get('Items');
|
||||
$this->sets = $this->get('Sets');
|
||||
$input = Factory::getApplication()->getInput();
|
||||
$this->started = $input->getMethod() === 'POST'
|
||||
&& $input->post->getString('participant_name', '') !== ''
|
||||
&& $input->post->getInt('set_id', 0) > 0;
|
||||
$this->results = $this->buildResults($this->items);
|
||||
|
||||
return parent::display($tpl);
|
||||
|
||||
Reference in New Issue
Block a user