Files

56 lines
2.8 KiB
PHP

<?php
/*
* Reflector Dashboard — web front-end for SvxReflector
* Copyright (C) 2026 SA7AUX (Björn)
* SPDX-License-Identifier: AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version. See the LICENSE file for details.
*/
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';
?>