aboutsummaryrefslogtreecommitdiff
path: root/app/views/shared/chooser_form.php
blob: ea5ee5f155826f08ab5ebded067ad0e8ac01f461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<form action="<?= !empty($list['stop']) ? $controller->action_link('index') : $controller->action_link('chooser'); ?>" style="width: 100%;" id="<?= htmlReady($name) ?>">
    <? if (!empty($list['elements']) && sizeof($list['elements'])) : ?>
    <input type="hidden" name="step" value="<?= htmlReady($name) ?>">
    <? if (!empty($list['stop'])) : ?>
    <input type="hidden" name="stop" value="1">
    <? endif; ?>
    <label><?= $list['headline'] ?>
        <select name="id" style="width: 100%;">
            <option value="">-- <?= _('Bitte wählen') ?> --</option>
        <? foreach ($list['elements'] as $key => $element) : ?>
            <option value="<?= htmlReady($key) ?>"<?= (!empty($list['selected']) && $key == $list['selected']) ? ' selected' : '' ?>>
                <?= htmlReady($element['name']) ?>
            </option>
        <? endforeach; ?>
        </select>
    </label>
    <? endif; ?>
</form>