aboutsummaryrefslogtreecommitdiff
path: root/app/views/file/add_url.php
blob: 4a0c48659aa27d1ba0a70a6e38ee0a4896825cd2 (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
<form action="<?= $controller->action_link('add_url/' . $top_folder->id) ?>" method="post" data-dialog class="default">
    <?= CSRFProtection::tokenTag() ?>
    <fieldset>
        <legend><?= _('Datei aus dem Internet verlinken') ?></legend>
        <label>
            <?= _('Webadresse') ?>
            <input type="text" name="url" placeholder="https://..." required
                   value="<?= htmlReady(Request::get('url')) ?>">
        </label>
        <label>
            <?= _('Gewünschter Dateiname') ?>
            <input type="text" name="name" placeholder="<?= _('Beispielname.pdf') ?>"
                   value="<?= htmlReady(Request::get('name')) ?>">
        </label>

    </fieldset>
    <fieldset>
        <legend><?= _('Zugriffsart') ?></legend>
        <label>
            <input type="radio" name="access_type" value="redirect"
                <? if (Request::option('access_type') !== 'proxy') echo 'checked'; ?>>
            <?= _('Direktlink')?>
        </label>
        <label>
            <input type="radio" name="access_type" value="proxy"
                <? if (Request::option('access_type') === 'proxy') echo 'checked'; ?>>
            <?= _('Link über Proxy')?>
        </label>

    </fieldset>
    <?= $this->render_partial('file/_terms_of_use_select.php', [
        'content_terms_of_use_entries' => $content_terms_of_use_entries,
        'selected_terms_of_use_id'     => $content_terms_of_use_id,
    ]) ?>
    <footer data-dialog-button>
        <?= Studip\Button::createAccept(_('Speichern'), 'store') ?>
        <?= Studip\LinkButton::createCancel(
            _('Zurück'),
            $controller->action_url('add_files_window/' . Request::option('to_folder_id'), $options ?? []),
            ['data-dialog' => '']
        ) ?>
    </footer>
</form>