Skip to content
Snippets Groups Projects
Commit 6159b797 authored by Bart Visscher's avatar Bart Visscher
Browse files

Take setting default value out of loop

parent ffc5c4da
Branches
No related tags found
No related merge requests found
......@@ -12,8 +12,8 @@
<td>
<select id="category" name="categories[]" multiple="multiple" title="<?php echo $l->t("Select category") ?>">
<?php
foreach($_['category_options'] as $category){
if (!isset($_['categories'])) {$_['categories'] = array();}
foreach($_['category_options'] as $category){
echo '<option value="' . $category . '"' . (in_array($category, $_['categories']) ? ' selected="selected"' : '') . '>' . $category . '</option>';
}
?>
......@@ -22,8 +22,8 @@
<td>
<select style="width:140px;" name="calendar">
<?php
foreach($_['calendar_options'] as $calendar){
if (!isset($_['calendar'])) {$_['calendar'] = false;}
foreach($_['calendar_options'] as $calendar){
echo '<option value="' . $calendar['id'] . '"' . ($_['calendar'] == $calendar['id'] ? ' selected="selected"' : '') . '>' . $calendar['displayname'] . '</option>';
}
?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment