aboutsummaryrefslogtreecommitdiff
path: root/app/views/quickselection/configuration.php
blob: af8aa98f3ae7c82e7d20cb96436ed13ba041cd4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
 * @var QuickselectionController $controller
 * @var Navigation[] $links
 * @var array $config
 */
?>
<div id="quickSelectionEdit">
    <form id="configure_quickselection" action="<?= $controller->link_for('quickselection/save') ?>" method="post" class="default" data-dialog>
        <fieldset>
            <legend><?= _("Inhalte des Schnellzugriff-Widget:") ?></legend>
            <fieldset>
            <? foreach ($links as $key=>$nav) : ?>
                <label>
                    <!-- values which are not in $config are displayed checked,
                    but checked values will be returned via add_removes[]  and be stored with a 'deactivated' value-->
                    <input type="checkbox" name="add_removes[]" value="<?= htmlReady($key) ?>"
                        <?= (empty($config) || !isset($config[$key]) || $config[$key] !== 'deactivated') ? 'checked' : ''?>>
                    <?= htmlReady($nav->getTitle()) ?>
                </label>
            <? endforeach ?>
            </fieldset>
        </fieldset>
        <footer data-dialog-button>
            <?= Studip\Button::createAccept(_('Speichern')) ?>
            <?= Studip\Button::createCancel(_('Abbrechen'), URLHelper::getURL('dispatch.php/start')) ?>
        </footer>
    </form>
</div>