Select default task list in edit form (#3292)

This commit is contained in:
Thomas Bruederli 2014-08-12 12:29:09 +02:00
parent fc2db9a840
commit 1016f4381c

View file

@ -279,13 +279,17 @@ class tasklist_ui
$attrib['name'] = 'list';
$attrib['is_escaped'] = true;
$select = new html_select($attrib);
$default = null;
foreach ((array)$this->plugin->driver->get_lists() as $id => $prop) {
if ($prop['editable'])
if ($prop['editable']) {
$select->add($prop['name'], $id);
if (!$default || $prop['default'])
$default = $id;
}
}
return $select->show(null);
return $select->show($default);
}