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 @@ ...@@ -64,12 +64,14 @@
<?= htmlReady($criteria['title']) ?> <?= htmlReady($criteria['title']) ?>
<select name="<?= htmlReady($criteria['name']) ?>"> <select name="<?= htmlReady($criteria['name']) ?>">
<? if (is_array($criteria['options'])): ?> <? 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) ?>" <option value="<?= htmlReady($value) ?>"
<?= ($value == $criteria['value'] <?= $value == $criteria['value'] ? 'selected' : '' ?>
? 'selected="selected"' >
: '') ?>> <?= htmlReady($chunks[0]) ?>
<?= htmlReady($title) ?>
</option> </option>
<? endforeach ?> <? endforeach ?>
<? endif ?> <? 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