diff --git a/lib/models/resources/ResourcePropertyDefinition.class.php b/lib/models/resources/ResourcePropertyDefinition.class.php index 04c492444e42195e9858127b30a884189e095299..d2d7bf64ea44cfeb89f1914f10c840ef64503c5f 100644 --- a/lib/models/resources/ResourcePropertyDefinition.class.php +++ b/lib/models/resources/ResourcePropertyDefinition.class.php @@ -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 []; } diff --git a/templates/sidebar/room-search-criteria.php b/templates/sidebar/room-search-criteria.php index 383068188e079cb6e7c01f222d4321fbec75a196..afe4f9ecfcbecad15c32b8501dd9a0053501ede5 100644 --- a/templates/sidebar/room-search-criteria.php +++ b/templates/sidebar/room-search-criteria.php @@ -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>