aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/topics/copy.php
blob: d0f97ef04829519b841fbc9590eabba79e2f25db (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
30
31
32
33
34
35
36
37
38
39
<form action="<?= URLHelper::getLink("dispatch.php/course/topics/copy") ?>" method="post" class="default">
    <fieldset>
        <legend><?= _('Themen auswählen') ?></legend>
    <script>
        STUDIP.Topics = {
            loadTopics: function (seminar_id) {
                jQuery.ajax({
                    'url': STUDIP.URLHelper.getURL("dispatch.php/course/topics/fetch_topics"),
                    'data': { 'seminar_id': seminar_id },
                    'dataType': "json",
                    'success': function (json) {
                        jQuery("#topiclist").html(json.html);
                    }
                });
                return true;
            }
        };
    </script>

    <label>
        <?= _('Veranstaltung') ?>

        <?= QuickSearch::get("copy_from", $courseSearch)
            ->fireJSFunctionOnSelect("STUDIP.Topics.loadTopics")
            ->render() ?>
    </label>

    <div id="topiclist">
    <? if (Request::option("seminar_id")) : ?>
        <?= $this->render_partial("_topiclist.php", ['topics' => CourseTopic::findBySeminar_id(Request::option("seminar_id"))]) ?>
    <? endif ?>
    </div>

    </fieldset>

    <footer data-dialog-button>
        <?= \Studip\Button::create(_("Kopieren"), 'copy') ?>
    </footer>
</form>