Select default task list in edit form (#3292)
This commit is contained in:
parent
fc2db9a840
commit
1016f4381c
1 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue