aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/wizard/step.php
blob: 214515a70ce2515d603f0f617e9eed709154b38d (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
40
41
42
43
44
45
46
47
<?php
/**
 * @var Course_WizardController $controller
 * @var string $content
 * @var string $temp_id
 * @var int $stepnumber
 * @var bool $first_step
 * @var bool|null $dialog
 */
?>
<? if ($content) : ?>
    <form class="default course-wizard-step-<?= $stepnumber ?>" action="<?= $controller->link_for('course/wizard/process', $stepnumber, $temp_id) ?>" method="post" data-secure>

        <? if (!$studygroup) : ?>
            <fieldset>
        <? endif; ?>
        <?= $content ?>
        <? if (!$studygroup) : ?>
            </fieldset>
        <? endif; ?>
        <footer data-dialog-button>
            <input type="hidden" name="step" value="<?= $stepnumber ?>">
        <? if (empty($first_step)): ?>
            <?= Studip\Button::create(
                _('Zurück'),
                'back',
                !empty($dialog) ? ['data-dialog' => 'size=50%'] : []
            ) ?>
        <? endif; ?>
            <? if (!$studygroup) : ?>
            <?= Studip\Button::create(
                _('Weiter'),
                'next',
                !empty($dialog) ? ['data-dialog' => 'size=50%'] : []
            ) ?>
            <? else : ?>
                <?= Studip\Button::createAccept(_('Studiengruppe anlegen'), 'create') ?>
            <? endif; ?>
        </footer>
    </form>
<? else : ?>
    <?= Studip\LinkButton::createCancel(
        _('Zurück zu meiner Veranstaltungsübersicht'),
        $controller->url_for($GLOBALS['perm']->have_perm('admin') ? 'admin/courses' : 'my_courses'),
        ['data-dialog-button' => '']
    ) ?>
<? endif ?>