aboutsummaryrefslogtreecommitdiff
path: root/app/views/my_ilias_accounts/add_object.php
blob: 21540409d695b4e49724be8e02f234604ae87db1 (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
<form class="default" action="<?= $controller->url_for('my_ilias_accounts/redirect/'.$ilias_index.'/new/'.$ilias_ref_id) ?>" method="post" target="_blank">
    <?= CSRFProtection::tokenTag() ?>
    <input type="hidden" name="ilias_target" value="new">
    <input type="hidden" name="ilias_ref_id" value="<?=$ilias_ref_id?>">
    <label>
        <span class="required"><?= _('Art des Lernobjekts') ?></span>
        <select name="ilias_module_type" required>
        <option></option>
        <? foreach ($ilias->getAllowedModuleTypes() as $module_index => $module_name) : ?>
            <option value="<?=$module_index?>"><?=$module_name?></option>
        <? endforeach ?>
        </select>
    </label>
    <footer data-dialog-button>
        <? if ($ilias->isActive()) : ?>
        <?= Studip\Button::createAccept(_('Erstellen'), 'submit') ?>
        <? endif ?>
        <?= Studip\Button::createCancel(_('Abbrechen'), 'cancel', ['data-dialog' => 'close']) ?>
    </footer>
</form>
<script>
jQuery(function ($) {
    $('form.default').submit(function () {
        window.setTimeout(function () {
            $('button[name=cancel]').click();
        }, 500);
    });
});
</script>