Skip to content
Snippets Groups Projects
Commit 53093b02 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #3782

Closes #3782

Merge request studip/studip!2654
parent 21a9e665
No related branches found
No related tags found
No related merge requests found
......@@ -107,7 +107,8 @@ class ResourcePropertyDefinition extends SimpleORMap
public function getOptionsArray()
{
if ($this->options) {
return explode(';', $this->options);
$options = explode(';', $this->options);
return array_combine($options, $options);
}
return [];
}
......
......@@ -64,9 +64,9 @@
<?= htmlReady($criteria['title']) ?>
<select name="<?= htmlReady($criteria['name']) ?>">
<? if (is_array($criteria['options'])): ?>
<? foreach ($criteria['options'] as $title): ?>
<option value="<?= htmlReady($title) ?>"
<?= $title == $criteria['value'] ? 'selected' : '' ?>
<? foreach ($criteria['options'] as $value => $title): ?>
<option value="<?= htmlReady($value) ?>"
<?= $value == $criteria['value'] ? 'selected' : '' ?>
>
<?= htmlReady($title) ?>
</option>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment