aboutsummaryrefslogtreecommitdiff
path: root/templates/forms/select_input.php
blob: 52d67768193ecebf1781bee2c50205db37271d7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div class="formpart">
    <label<?= ($this->required ? ' class="studiprequired"' : '') ?> for="<?= $id ?>">
        <span class="textlabel">
            <?= htmlReady($this->title) ?>
        </span>
        <? if ($this->required) : ?>
            <span class="asterisk" title="<?= _('Dies ist ein Pflichtfeld') ?>" aria-hidden="true">*</span>
        <? endif ?>
    </label>
    <select class="select2" name="<?= htmlReady($this->name) ?>" <?= ($this->required ? 'required aria-required="true"' : '') ?> id="<?= $id ?>" <?= $attributes ?>>
    <? foreach ($options as $key => $option) : ?>
        <option value="<?= htmlReady($key) ?>"<?= ($key == $value ? " selected" : "") ?>>
            <?= htmlReady($option) ?>
        </option>
    <? endforeach ?>
    </select>
</div>