first commit
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
<h1 class="h3 mb-3">Доступ к доске</h1>
|
||||
|
||||
<?php if (!empty($_SESSION['success'])): ?>
|
||||
<div class="alert alert-success">
|
||||
<?= htmlspecialchars($_SESSION['success']) ?>
|
||||
</div>
|
||||
<?php unset($_SESSION['success']); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($_SESSION['error'])): ?>
|
||||
<div class="alert alert-danger">
|
||||
<?= htmlspecialchars($_SESSION['error']) ?>
|
||||
</div>
|
||||
<?php unset($_SESSION['error']); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card shadow-sm mb-3">
|
||||
<div class="card-body">
|
||||
<div><strong>Название:</strong> <?= htmlspecialchars((string)$board['name']) ?></div>
|
||||
<div><strong>Код:</strong> <?= htmlspecialchars((string)$board['code']) ?></div>
|
||||
<?php if (!empty($board['description'])): ?>
|
||||
<div><strong>Описание:</strong> <?= htmlspecialchars((string)$board['description']) ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<form method="post" action="/admin/boards/access/save">
|
||||
<input type="hidden" name="board_id" value="<?= (int)$board['id'] ?>">
|
||||
|
||||
<label class="form-label fw-semibold">Группы, которым доступна доска</label>
|
||||
|
||||
<div class="border rounded p-3" style="max-height: 420px; overflow:auto;">
|
||||
<?php if (empty($groups)): ?>
|
||||
<div class="text-muted">Группы пока не загружены. Сначала синхронизируй AD.</div>
|
||||
<?php else: ?>
|
||||
<?php foreach ($groups as $group): ?>
|
||||
<div class="form-check mb-2">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
name="group_ids[]"
|
||||
value="<?= (int)$group['id'] ?>"
|
||||
id="group_<?= (int)$group['id'] ?>"
|
||||
<?= in_array((int)$group['id'], $selectedGroupIds, true) ? 'checked' : '' ?>
|
||||
>
|
||||
<label class="form-check-label" for="group_<?= (int)$group['id'] ?>">
|
||||
<?= htmlspecialchars((string)$group['name']) ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<button type="submit" class="btn btn-success">Сохранить доступ</button>
|
||||
<a href="/admin/boards" class="btn btn-secondary">Назад</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user