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

fixes #3754

Closes #3754

Merge request studip/studip!2639
parent e7f1909c
No related branches found
No related tags found
No related merge requests found
......@@ -64,12 +64,14 @@
<?= htmlReady($criteria['title']) ?>
<select name="<?= htmlReady($criteria['name']) ?>">
<? if (is_array($criteria['options'])): ?>
<? foreach ($criteria['options'] as $value => $title): ?>
<? foreach ($criteria['options'] as $title):
$chunks = explode('--', $title, 2);
$value = $chunks[1] ?? $chunks[0];
?>
<option value="<?= htmlReady($value) ?>"
<?= ($value == $criteria['value']
? 'selected="selected"'
: '') ?>>
<?= htmlReady($title) ?>
<?= $value == $criteria['value'] ? 'selected' : '' ?>
>
<?= htmlReady($chunks[0]) ?>
</option>
<? endforeach ?>
<? endif ?>
......
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