Files
reflector-dashboard/auth/tgrequest.php
T
bjorne cb8b9af20e sync från dev (svx-web): lastheard paginering + separat live-feed, listen-vy, UI-uppdateringar
- lastheard 24h: client-side paginering (lib/pager.js), dynamisk sidstorlek
- lastheard: separat live-feed (lastheard_live_view.js), 24h loggar varje key-up
- listen_view.js + auth/admin_listen.*: Listen Live
- genomgående UI/auth-uppdateringar synkade från dev
Inga hårdkodade secrets/IP/login — endast hostnamn.
2026-11-18 22:07:16 +01:00

46 lines
2.4 KiB
PHP

<?php
declare(strict_types=1);
require __DIR__ . '/lib.php';
start_session();
$uuid = $_SESSION['uid'] ?? null;
if (!is_string($uuid) || $uuid === '') { header('Location: /'); exit; }
$page_title = 'Request a TG — Reflector Dashboard';
require __DIR__ . '/header.php';
?>
<div class="container py-4" style="max-width:640px;">
<div class="panel">
<h5 class="mb-3">Request a Talkgroup</h5>
<p class="small text-secondary mb-3">Request a TG for your callsign. An admin reviews it; once approved you become the TG's owner and can manage its details (and co-admins) from your TG List. One open request at a time.</p>
<div id="reqPending" class="alert alert-info small" style="display:none;"></div>
<div class="mb-3">
<label class="small text-secondary">Callsign — becomes the TG owner on approval</label>
<div id="reqCallsign" class="mono" style="padding:6px 10px;border:1px solid var(--line);border-radius:4px;background:var(--bg);">—</div>
</div>
<form id="reqForm">
<div class="mb-2"><label class="small text-secondary">TG number</label>
<input id="reqTg" type="number" class="form-control form-control-sm mono" required></div>
<div class="mb-2"><label class="small text-secondary">Name</label>
<input id="reqName" class="form-control form-control-sm" maxlength="64" required></div>
<div class="mb-2"><label class="small text-secondary">System (reflector / network)</label>
<input id="reqSystem" class="form-control form-control-sm" maxlength="64"></div>
<div class="mb-2"><label class="small text-secondary">AllStar node</label>
<input id="reqAllstar" class="form-control form-control-sm mono" maxlength="10"></div>
<div class="mb-3"><label class="small text-secondary">Mode</label>
<input id="reqMode" class="form-control form-control-sm" maxlength="16" placeholder="AllStar / DMR / SVX"></div>
<div class="d-flex gap-2">
<button type="submit" class="btn btn-success btn-sm" id="reqSubmit">Submit request</button>
<button type="button" class="btn btn-outline-danger btn-sm" id="reqCancel" style="display:none;">Cancel my request</button>
</div>
</form>
<div id="reqMsg" class="small mt-3" style="display:none;"></div>
</div>
</div>
<?php
$extra_scripts = '<script src="/auth/tgrequest.js?v=' . @filemtime(__DIR__ . '/tgrequest.js') . '"></script>';
require __DIR__ . '/footer.php';
?>