summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-08-12 10:29:09 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-08-12 10:29:09 (GMT)
commit1016f4381c6ecf98cd1a7b76b6eb15a3a32a6854 (patch)
treea2a7da1c71839680cf94d76413babd4bbca7f18d
parentfc2db9a8408c23ca8ac8e5640f7fc19354ec798f (diff)
downloadroundcubemail-plugins-kolab-1016f4381c6ecf98cd1a7b76b6eb15a3a32a6854.tar.gz
Select default task list in edit form (#3292)
-rw-r--r--plugins/tasklist/tasklist_ui.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/tasklist/tasklist_ui.php b/plugins/tasklist/tasklist_ui.php
index 66ff799..5b10df4 100644
--- a/plugins/tasklist/tasklist_ui.php
+++ b/plugins/tasklist/tasklist_ui.php
@@ -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);
}