aboutsummaryrefslogtreecommitdiff
path: root/app/views/tfa/setup.php
blob: e4a0a3defeff8de1d95c2be9ce4bb892bdf15ad0 (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
<?php
/**
 * @var TfaController $controller
 * @var bool $own_profile
 */
?>
<form class="default" action="<?= $controller->create() ?>" method="post">
    <?= CSRFProtection::tokenTag() ?>

    <fieldset>
        <legend><?= _('Zwei-Faktor-Authentifizierung einrichten') ?></legend>

        <?= formatReady(Config::get()->TFA_TEXT_INTRODUCTION) ?>

        <label>
            <input required type="radio" name="type" value="email"
                   <? if (!$own_profile) echo 'disabled'; ?>>
            <?= _('E-Mail') ?>
        </label>

        <label>
            <input required type="radio" name="type" value="app"
                   <? if (!$own_profile) echo 'disabled'; ?>>
            <?= _('Authenticator-App') ?>
        </label>
    </fieldset>

    <footer>
        <?= Studip\Button::createAccept(_('Aktivieren'), 'activate', $own_profile ? [] : [
            'disabled' => ''
        ]) ?>
    </footer>
</form>