OpenNIT

Quelltext des aktuellen Standes

Fassung 1.1.1

team_form.php

3 KB
<?php $this->layout('layouts/admin', ['page_title' => $page_title, 'current_admin_page' => 'vault-teams', 'hide_page_title' => true]); ?>

<div class="admin-page-header">
    <h1>
        <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
             style="display:inline;vertical-align:-3px;margin-right:0.4rem;">
            <rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>
        </svg>
        <?= $this->e($page_title) ?>
    </h1>
    <a href="/admin/vault/teams" class="btn btn-default btn-sm">
        <?= $this->te('&larr; Team-Tresore') ?>
    </a>
</div>

<div class="row">
    <div class="col-md-6">
        <div class="card">
            <div class="card-body">
                <form method="POST" action="<?= $this->e($form_action) ?>">
                    <input type="hidden" name="_csrf" value="<?= $this->csrf() ?>">

                    <div class="form-group">
                        <label for="name"><?= $this->te('Team-Name') ?> <span class="text-danger">*</span></label>
                        <input type="text" id="name" name="name" class="form-control"
                               value="<?= $this->e($team['name'] ?? '') ?>" required autofocus
                               placeholder="<?= $this->te('z.B. IT-Infrastruktur') ?>">
                    </div>

                    <div class="form-group">
                        <label for="description"><?= $this->te('Beschreibung') ?></label>
                        <textarea id="description" name="description" class="form-control" rows="3"
                                  placeholder="<?= $this->te('Kurze Beschreibung des Teams (optional)') ?>"><?= $this->e($team['description'] ?? '') ?></textarea>
                    </div>

                    <?php if ($team === null): ?>
                    <div class="callout callout-info">
                        <h5><i class="fas fa-lock"></i> <?= $this->te('Sicherheitshinweis') ?></h5>
                        <?= $this->te('Nach dem Anlegen wird ein zufälliger Team-Schlüssel (TVK) generiert. Mitglieder erhalten beim nächsten Login automatisch Zugriff auf den Team-Tresor.') ?>
                    </div>
                    <?php endif; ?>

                    <div class="form-group mb-0">
                        <button type="submit" class="btn btn-primary">
                            <i class="fas fa-save"></i> <?= $this->te('Speichern') ?>
                        </button>
                        <a href="/admin/vault/teams" class="btn btn-default ml-2"><?= $this->te('Abbrechen') ?></a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>