aboutsummaryrefslogtreecommitdiff
path: root/resources/assets/javascripts/bootstrap/course_wizard.js
blob: b96ebe76431e7a94a6a2142c4dc266e25f643564 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
STUDIP.domReady(function() {
    if ($('.sem-tree-assigned-root > ul > li').length == 0) {
        $('.sem-tree-assigned-root').addClass('hidden-js');
    }
});

STUDIP.ready(function() {
    $('#wizard-coursetype').on('change', function() {
        let semtype = $(this).val();
        let mandatory_types = $('#wizard-maxmember').parent('section').data('mandatory');
        if (mandatory_types.includes(semtype)) {
            $('#wizard-maxmember').parent('section').show();
        } else {
            $('#wizard-maxmember').parent('section').hide();
        }
    });
});