Turnkontakte zum Formular führen und Fitness-II-Zeit aktualisieren

This commit is contained in:
2026-09-14 13:47:26 +02:00
parent d57017072f
commit e6ac00b248
8 changed files with 16 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ declare(strict_types=1);
* Kontaktformular (Felder wie auf der alten Seite). Props:
* $intro array{title, text}|null — optionaler Intro-Block (Überschrift, Teaser, Direkt-Mail).
* Weglassen → nur das Formular (z. B. auf /kontakt, wo der Hero den Kontext liefert).
* $showDirectMail bool (optional, Default true) — Direkt-Mail im Intro anzeigen.
* $return string optional — Slug der absendenden Seite (Default '' = Startseite). Die Action
* leitet nach PRG hierher zurück (whitelist-validiert), damit /kontakt nicht auf die
* Startseite springt.
@@ -30,6 +31,7 @@ declare(strict_types=1);
$club = json_load('club');
$return = $return ?? '';
$intro = $intro ?? null;
$showDirectMail = $showDirectMail ?? true;
$notice = $notice ?? '';
$noticeTitle = $noticeTitle ?? '';
$noticeTone = $noticeTone ?? 'info';
@@ -79,7 +81,9 @@ $f = [
<div class="contact__intro">
<h2><?= e($intro['title']) ?></h2>
<p><?= e($intro['text']) ?></p>
<?php if ($showDirectMail): ?>
<p class="text-muted">Oder direkt per Mail an <a href="mailto:<?= e($directMail) ?>"><?= e($directMail) ?></a></p>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($notice !== ''): ?>

View File

@@ -9,6 +9,7 @@ declare(strict_types=1);
* $contactEmail string (optional) — persönliche E-Mail der Ansprechperson für die
* Kontakt-Kachel. Überschreibt die Abteilungs-Mail (club.email_turnen), falls
* gesetzt — genutzt, wenn eine Disziplin einen eigenen direkten Draht angibt.
* $contactHref string (optional) — Formular-Link statt E-Mail-Link in der Kontakt-Kachel.
* $contactPhone string (optional) — Telefonnummer der Ansprechperson (Anzeige-Form). Ergibt
* einen zusätzlichen tel:-Link in der Kontakt-Kachel. tel:-Href wie in person-card.php.
* $notice string (optional) — hervorgehobener Hinweis (z. B. Wartelisten-Status)
@@ -54,6 +55,7 @@ $groupsTitleHidden = $groupsTitleHidden ?? false;
$layout = ($layout ?? 'tabs') === 'stacked' ? 'stacked' : 'tabs';
$lead = $lead ?? '';
$contactEmail = $contactEmail ?? '';
$contactHref = $contactHref ?? '';
$contactPhone = $contactPhone ?? '';
$notice = $notice ?? '';
$noticeTitle = $noticeTitle ?? '';
@@ -230,13 +232,15 @@ $soleNote = $single ? ($groups[0]['note'] ?? '') : '';
</article>
<?php endif; ?>
<?php if ($lead !== '' || $email !== '' || $telHref !== ''): ?>
<?php if ($lead !== '' || $contactHref !== '' || $email !== '' || $telHref !== ''): ?>
<article class="bento__tile bento__tile--accent turnen-dash__contact">
<span class="bento__stat-label">Kontakt</span>
<?php if ($lead !== ''): ?>
<span class="bento__stat-value"><?= e($lead) ?></span>
<?php endif; ?>
<?php if ($email !== ''): ?>
<?php if ($contactHref !== ''): ?>
<a class="turnen-dash__mail" href="<?= e($contactHref) ?>"><?= icon('envelope', 'turnen-dash__mail-icon') ?>Zum Kontaktformular</a>
<?php elseif ($email !== ''): ?>
<a class="turnen-dash__mail" href="mailto:<?= e($email) ?>"><?= icon('envelope', 'turnen-dash__mail-icon') ?>E-Mail schreiben</a>
<?php endif; ?>
<?php if ($telHref !== ''): ?>