Files
Plenario/templates/Slides/form.php
T
gnilebeinandClaude Sonnet 5.5 b496032604
CI / Deploy / PHP 8.5 (push) Successful in 1m13s
CI / Deploy / PHP 8.4 (push) Successful in 1m17s
CI / Deploy / test (push) Successful in 1s
CI / Deploy / deploy (push) Skipped
Make "comment without rating" a choice in a comment dropdown
The scale form replaces the comment checkbox with a dropdown: no
comment field, comment with mandatory rating, or comment alone is
enough. Existing slides keep their behaviour (rating mandatory).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-21 13:07:20 +01:00

374 lines
26 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Add / edit form for slides. Type specific fields are rendered per type;
* the type itself cannot be changed after creation.
*
* @var \App\View\AppView $this
* @var \App\Model\Entity\Poll $poll
* @var string $adminToken
* @var \App\Model\Entity\Slide $slide
* @var string $optionsText
* @var list<array{label: string, correct: bool}> $quizOptions
* @var list<string> $orderOptions Ordering slide: labels in the correct order
* @var string $preparedText Q&A slide: questions entered beforehand, one per line
* @var bool|null $hasResponses
*/
use App\Service\YouTubeService;
$isNew = $slide->isNew();
$settings = $slide->getSettings();
$this->assign('title', $isNew ? __('Neue Folie') : __('Folie bearbeiten'));
$this->assign('noindex', '1');
$formUrl = $isNew
? ['_name' => 'slides:add', 'token' => $adminToken, '?' => ['type' => $slide->type]]
: ['_name' => 'slides:edit', 'token' => $adminToken, 'id' => $slide->id];
$optionsError = $slide->getError('options_text');
?>
<p><a href="<?= $this->Url->build(['_name' => 'admin', 'token' => $adminToken]) ?>">← <?= __('Zurück zu „{0}“', h($poll->title)) ?></a></p>
<section class="card card--form" data-modal-content>
<p class="eyebrow"><?= h($slide->typeLabel()) ?></p>
<h1 id="modal-title"><?= $isNew ? __('Neue Folie') : __('Folie bearbeiten') ?></h1>
<?= $this->Form->create($slide, ['url' => $formUrl, 'type' => 'file']) ?>
<?= $this->Form->hidden('type') ?>
<?php if ($slide->isYouTube()) :
$urlError = $slide->getError('youtube_url');
$startError = $slide->getError('youtube_start');
$linkStart = YouTubeService::parseUrl((string)$settings['url'])['start'] ?? null;
// Leave the field empty when the start comes from the link, so a changed link wins.
$startValue = $this->getRequest()->is(['post', 'put', 'patch'])
? (string)$this->getRequest()->getData('settings.start', '')
: ((int)$settings['start'] > 0 && (int)$settings['start'] !== $linkStart ? YouTubeService::formatTime((int)$settings['start']) : '');
$previewUrl = $settings['video_id'] !== '' && !$urlError
? YouTubeService::embedUrl((string)$settings['video_id'], (int)$settings['start'])
: null;
?>
<div class="youtube-fields" data-youtube-form="<?= h($this->Url->build(['_name' => 'slides:youtube-check', 'token' => $adminToken])) ?>">
<div class="input text required<?= $urlError ? ' error' : '' ?>">
<label for="youtube-url"><?= __('YouTube-Link') ?></label>
<div class="copy-field">
<input type="text" inputmode="url" id="youtube-url" name="settings[url]" maxlength="500" required
autocomplete="off" spellcheck="false" <?= $isNew ? 'autofocus' : '' ?>
value="<?= h((string)$settings['url']) ?>"
placeholder="https://www.youtube.com/watch?v=dQw4w9WgXcQ"
aria-describedby="youtube-url-hint youtube-status<?= $urlError ? ' youtube-url-error' : '' ?>"
<?= $urlError ? 'aria-invalid="true"' : '' ?> data-youtube-url>
<button type="button" class="button" data-youtube-check hidden><?= __('Link prüfen') ?></button>
</div>
<p class="hint" id="youtube-url-hint"><?= __('Links von youtube.com, youtu.be und Shorts funktionieren. Beim Speichern wird geprüft, ob das Video existiert und eingebettet werden darf.') ?></p>
<?php if ($urlError) : ?>
<div class="error-message" id="youtube-url-error"><?= h(implode(' ', (array)$urlError)) ?></div>
<?php endif; ?>
<p class="youtube-status" id="youtube-status" role="status" aria-live="polite" data-youtube-status></p>
</div>
<div class="youtube-preview" data-youtube-preview <?= $previewUrl ? '' : 'hidden' ?>>
<?php if ($previewUrl) : ?>
<iframe src="<?= h($previewUrl) ?>" title="<?= __('Vorschau des Videos') ?>" loading="lazy"
referrerpolicy="strict-origin" allow="encrypted-media; picture-in-picture; fullscreen" allowfullscreen></iframe>
<?php endif; ?>
</div>
<div class="input text<?= $startError ? ' error' : '' ?>">
<label for="youtube-start"><?= __('Start bei (Minute:Sekunde, optional)') ?></label>
<input type="text" id="youtube-start" name="settings[start]" class="input-short" maxlength="10"
inputmode="numeric" autocomplete="off" value="<?= h($startValue) ?>"
placeholder="<?= h($linkStart !== null ? YouTubeService::formatTime($linkStart) : '0:00') ?>"
aria-describedby="youtube-start-hint<?= $startError ? ' youtube-start-error' : '' ?>"
<?= $startError ? 'aria-invalid="true"' : '' ?> data-youtube-start>
<p class="hint" id="youtube-start-hint" data-youtube-start-hint><?= $linkStart !== null
? __('Leer lassen, um beim Zeitpunkt aus dem Link ({0}) zu starten.', YouTubeService::formatTime($linkStart))
: __('Z. B. 1:30 oder nur die Minute (2). Leer lassen, um am Anfang bzw. beim Zeitpunkt aus dem Link (…&t=90s) zu starten.') ?></p>
<?php if ($startError) : ?>
<div class="error-message" id="youtube-start-error"><?= h(implode(' ', (array)$startError)) ?></div>
<?php endif; ?>
</div>
<?= $this->Form->control('settings.autoplay', [
'type' => 'checkbox',
'label' => __('Automatisch abspielen, sobald die Folie in der Präsentation erscheint'),
'checked' => (bool)$settings['autoplay'],
]) ?>
<p class="hint"><?= __('Manche Browser spielen Videos mit Ton erst automatisch ab, nachdem du in der Präsentation einmal geklickt oder eine Taste gedrückt hast.') ?></p>
</div>
<?php endif; ?>
<?= $this->Form->control('question', [
'label' => match ($slide->type) {
'content' => __('Überschrift'),
'youtube' => __('Titel'),
'qa' => __('Überschrift'),
default => __('Frage'),
},
'maxlength' => 500,
'required' => !$slide->isYouTube(),
'autofocus' => $isNew && !$slide->isYouTube(),
'placeholder' => match (true) {
$slide->isYouTube() => __('Leer lassen, um den Titel des Videos zu übernehmen'),
$slide->isQa() => __('z. B. Eure Fragen an den Vorstand'),
default => null,
},
'data-youtube-title' => $slide->isYouTube() ? '' : null,
]) ?>
<?= $this->Form->control('description', [
'type' => 'textarea',
'rows' => $slide->type === 'content' ? 6 : 2,
'label' => $slide->type === 'content' ? __('Text') : __('Beschreibung (optional)'),
'aria-describedby' => 'description-format',
]) ?>
<p class="hint" id="description-format"><?= __('Formatierung wie bei WhatsApp: *fett*, _kursiv_, ~durchgestrichen~, Aufzählung mit „- “ am Zeilenanfang.') ?></p>
<?= $this->element('slide_image_fields', compact('slide', 'poll')) ?>
<?php if ($slide->type === 'choice') : ?>
<div class="input textarea<?= $optionsError ? ' error' : '' ?>">
<label for="options-text"><?= __('Antwortoptionen (eine pro Zeile, max. 20)') ?></label>
<textarea id="options-text" name="options_text" rows="6" required><?= h($optionsText) ?></textarea>
<?php // Shortcut for formal votes; needs JavaScript, so it stays hidden without it. ?>
<button type="button" class="button button--small button--ghost" hidden
data-add-option="<?= h(__('Enthaltung')) ?>" data-add-option-target="options-text"
data-add-option-max="20">+ <?= __('Option „Enthaltung“ hinzufügen') ?></button>
<?php if ($optionsError) : ?>
<div class="error-message"><?= h(implode(' ', (array)$optionsError)) ?></div>
<?php endif; ?>
<?php if (!empty($hasResponses)) : ?>
<p class="hint"><?= __('Achtung: Entfernte oder umbenannte Optionen verlieren ihre bisherigen Stimmen.') ?></p>
<?php endif; ?>
</div>
<?= $this->Form->control('settings.multiple', [
'type' => 'checkbox',
'label' => __('Mehrfachauswahl erlauben'),
'checked' => (bool)$settings['multiple'],
]) ?>
<?= $this->Form->control('settings.comments', [
'type' => 'checkbox',
'label' => __('Kommentarfeld anzeigen (Teilnehmende können ihre Auswahl optional begründen)'),
'checked' => (bool)$settings['comments'],
]) ?>
<p class="hint"><?= __('Die Kommentare laufen in der Präsentation nacheinander unter dem Ergebnis durch (nicht bei den Teilnehmenden). Das Tempo stellst du für die ganze Umfrage in den Einstellungen im Dashboard ein.') ?></p>
<?php elseif ($slide->type === 'open') : ?>
<?= $this->Form->control('settings.private', [
'type' => 'checkbox',
'label' => __('Anonymes Feedback: Antworten nicht öffentlich anzeigen'),
'checked' => (bool)$settings['private'],
]) ?>
<p class="hint"><?= __('Die Präsentation zeigt zunächst nur, wie viele Antworten eingegangen sind. Mit „Ergebnisse zeigen“ (Taste H) kannst du die Texte bei Bedarf einblenden. Teilnehmende sehen sie nie, im PDF-Export stehen sie nur in der vollständigen Fassung.') ?></p>
<?php elseif ($slide->type === 'wordcloud') : ?>
<?= $this->Form->control('settings.allow_upvotes', [
'type' => 'checkbox',
'label' => __('Upvotes erlauben (Teilnehmende sehen die Wortwolke live und können Begriffe per Klick unterstützen)'),
'checked' => (bool)$settings['allow_upvotes'],
]) ?>
<?= $this->Form->control('settings.allow_downvotes', [
'type' => 'checkbox',
'label' => __('Downvotes erlauben (nur zusammen mit Upvotes: Teilnehmende können Begriffe anderer ablehnen)'),
'checked' => (bool)$settings['allow_downvotes'],
]) ?>
<?php elseif ($slide->type === 'scale') : ?>
<?php $stars = $settings['style'] === \App\Model\Entity\Slide::SCALE_STARS; ?>
<fieldset class="scale-style" data-scale-style>
<legend><?= __('Darstellung') ?></legend>
<?= $this->Form->radio('settings.style', [
['value' => \App\Model\Entity\Slide::SCALE_NUMBERS, 'text' => __('Zahlen (z. B. 1 bis 10)')],
['value' => \App\Model\Entity\Slide::SCALE_STARS, 'text' => __('Sterne (wie bei einer Produktbewertung)')],
], ['value' => $settings['style']]) ?>
</fieldset>
<div class="grid grid--2 grid--tight">
<?= $this->Form->control('settings.scale_min', [
'type' => 'select', 'options' => [0 => '0', 1 => '1'],
'label' => __('Von'), 'value' => $settings['scale_min'],
'templateVars' => ['attrs' => $stars ? ' hidden' : ''],
'templates' => ['inputContainer' => '<div class="input {{type}}{{required}}" data-scale-min{{attrs}}>{{content}}</div>'],
]) ?>
<?= $this->Form->control('settings.scale_max', [
'type' => 'select', 'options' => array_combine(range(2, 10), range(2, 10)),
'label' => $stars ? __('Anzahl Sterne') : __('Bis'), 'value' => $settings['scale_max'],
'data-label-numbers' => __('Bis'), 'data-label-stars' => __('Anzahl Sterne'),
]) ?>
</div>
<?php // Labels in their own row, so hiding "Von" (stars) does not move them. ?>
<div class="grid grid--2 grid--tight">
<?= $this->Form->control('settings.min_label', [
'label' => __('Beschriftung links (optional)'), 'maxlength' => 60,
'placeholder' => __('z. B. gar nicht'), 'value' => $settings['min_label'],
]) ?>
<?= $this->Form->control('settings.max_label', [
'label' => __('Beschriftung rechts (optional)'), 'maxlength' => 60,
'placeholder' => __('z. B. sehr'), 'value' => $settings['max_label'],
]) ?>
</div>
<?= $this->Form->control('settings.scale_view', [
'type' => 'select',
'label' => __('In der Präsentation zeigen'),
'options' => [
\App\Model\Entity\Slide::SCALE_VIEW_BOTH => __('Durchschnitt und Verteilung'),
\App\Model\Entity\Slide::SCALE_VIEW_AVERAGE => __('Nur Durchschnitt'),
\App\Model\Entity\Slide::SCALE_VIEW_CHART => __('Nur Verteilung (Diagramm)'),
],
'value' => $settings['scale_view'],
]) ?>
<p class="hint"><?= __('Die Auswertung in der Verwaltung und der PDF-Export enthalten immer beides.') ?></p>
<?= $this->Form->control('settings.comment_mode', [
'type' => 'select',
'label' => __('Kommentarfeld'),
'options' => [
'off' => __('Kein Kommentarfeld'),
'rating' => __('Kommentar optional, die Bewertung ist Pflicht'),
'only' => __('Kommentar optional, auch ein Kommentar ohne Bewertung genügt'),
],
'value' => empty($settings['comments']) ? 'off' : (empty($settings['comment_only']) ? 'rating' : 'only'),
]) ?>
<p class="hint"><?= __('Die Kommentare laufen in der Präsentation nacheinander durch (nicht bei den Teilnehmenden), jeder so lange, wie man zum Lesen braucht: kurze etwa 5 Sekunden, lange bis zu 30 Sekunden. Das Tempo stellst du für die ganze Umfrage in den Einstellungen im Dashboard ein. Bei internem Feedback erst, wenn du die Ergebnisse einblendest.') ?></p>
<?= $this->Form->control('settings.comment_ratings', [
'type' => 'checkbox',
'label' => __('Bewertung beim Kommentar in der Präsentation anzeigen'),
'checked' => (bool)$settings['comment_ratings'],
]) ?>
<?= $this->Form->control('settings.private', [
'type' => 'checkbox',
'label' => __('Internes Feedback: Ergebnis nicht öffentlich anzeigen'),
'checked' => (bool)$settings['private'],
]) ?>
<p class="hint"><?= __('Die Präsentation zeigt zunächst nur, wie viele Bewertungen eingegangen sind. Mit „Ergebnisse zeigen“ (Taste H) kannst du Verteilung, Durchschnitt und Kommentare bei Bedarf einblenden. Teilnehmende sehen sie nie, im PDF-Export stehen sie nur in der vollständigen Fassung.') ?></p>
<?php elseif ($slide->type === 'quiz') :
$quizError = $slide->getError('quiz_options');
$rows = $quizOptions;
// Offer the two required rows (more via "Antwort hinzufügen" with JS), plus one spare when editing.
$rowCount = min(\App\Model\Table\SlidesTable::MAX_QUIZ_OPTIONS, max(2, count($rows) + 1));
$rows = array_pad($rows, $rowCount, ['label' => '', 'correct' => false]);
?>
<fieldset class="quiz-options<?= $quizError ? ' error' : '' ?>" data-quiz-options
data-max="<?= \App\Model\Table\SlidesTable::MAX_QUIZ_OPTIONS ?>"
<?= $quizError ? 'aria-describedby="quiz-options-error"' : '' ?>>
<legend><?= __('Antworten') ?></legend>
<p class="hint" id="quiz-options-hint"><?= __('Mindestens zwei Antworten, maximal {0}. Hake die richtige(n) an – Teilnehmende sehen erst nach dem Ende, was richtig war.', \App\Model\Table\SlidesTable::MAX_QUIZ_OPTIONS) ?></p>
<ol class="quiz-options__list" data-quiz-list>
<?php foreach ($rows as $i => $row) : ?>
<li class="quiz-option" data-quiz-row>
<label class="sr-only" for="quiz-option-<?= $i ?>"><?= __('Antwort {0}', $i + 1) ?></label>
<input type="text" id="quiz-option-<?= $i ?>" name="quiz_options[<?= $i ?>][label]"
value="<?= h($row['label']) ?>" maxlength="255"
placeholder="<?= __('Antwort {0}', $i + 1) ?>" <?= $i < 2 ? 'required' : '' ?>>
<label class="quiz-option__correct">
<input type="checkbox" name="quiz_options[<?= $i ?>][correct]" value="1" <?= $row['correct'] ? 'checked' : '' ?>>
<span><?= __('richtig') ?></span>
</label>
</li>
<?php endforeach; ?>
</ol>
<button type="button" class="button button--small" data-quiz-add hidden>+ <?= __('Antwort hinzufügen') ?></button>
<?php if ($quizError) : ?>
<div class="error-message" id="quiz-options-error"><?= h(implode(' ', (array)$quizError)) ?></div>
<?php endif; ?>
<?php if (!empty($hasResponses)) : ?>
<p class="hint"><?= __('Achtung: Entfernte oder umbenannte Antworten verlieren ihre bisherigen Stimmen.') ?></p>
<?php endif; ?>
</fieldset>
<?php
$limits = [];
foreach (\App\Model\Entity\Slide::QUIZ_TIME_LIMITS as $seconds) {
$limits[$seconds] = match (true) {
$seconds === 0 => __('Kein Zeitlimit – ich beende das Quiz selbst'),
$seconds < 60 => __('{0} Sekunden', $seconds),
$seconds % 60 === 0 => __n('{0} Minute', '{0} Minuten', intdiv($seconds, 60), intdiv($seconds, 60)),
default => __('{0} Minuten', number_format($seconds / 60, 1, ',', '')),
};
}
?>
<?= $this->Form->control('settings.time_limit', [
'type' => 'select',
'options' => $limits,
'label' => __('Zeitlimit'),
'value' => $settings['time_limit'],
]) ?>
<p class="hint"><?= __('Das Quiz startet erst, wenn du es in der Präsentation startest. Du kannst es jederzeit vorzeitig beenden.') ?></p>
<?php elseif ($slide->isOrder()) :
$orderError = $slide->getError('order_options');
$max = \App\Model\Table\SlidesTable::MAX_ORDER_OPTIONS;
$rows = array_pad($orderOptions, min($max, max(2, count($orderOptions) + 1)), '');
?>
<fieldset class="order-options<?= $orderError ? ' error' : '' ?>" data-order-options data-max="<?= $max ?>"
aria-describedby="order-options-hint<?= $orderError ? ' order-options-error' : '' ?>">
<legend><?= __('Einträge') ?></legend>
<p class="hint" id="order-options-hint"><?= __('Mindestens zwei, maximal {0} Einträge. Bei einer Folie mit richtiger Lösung von oben (zuerst) nach unten eintragen. Teilnehmende bekommen sie gemischt und müssen sie sortieren. Leere Zeilen werden ignoriert.', $max) ?></p>
<p class="hint" data-order-hint hidden><?= __('Zum Umsortieren den Griff ⠿ ziehen, oder Griff fokussieren und Pfeiltasten nutzen.') ?></p>
<ol class="order-options__list" data-order-list>
<?php foreach ($rows as $i => $label) : ?>
<li class="order-option" data-order-row>
<button type="button" class="drag-handle" data-drag-handle hidden
aria-label="<?= __('Eintrag verschieben (Pfeiltasten)') ?>" title="<?= __('Ziehen zum Sortieren') ?>">⠿</button>
<span class="order-option__pos" data-position aria-hidden="true"><?= $i + 1 ?>.</span>
<label class="sr-only" for="order-option-<?= $i ?>" data-row-label><?= __('Platz {0}', $i + 1) ?></label>
<input type="text" id="order-option-<?= $i ?>" name="order_options[]"
value="<?= h($label) ?>" maxlength="255" <?= $i < 2 ? 'required' : '' ?>
placeholder="<?= __('Eintrag {0}', $i + 1) ?>">
</li>
<?php endforeach; ?>
</ol>
<p class="sr-only" role="status" aria-live="polite" data-order-status></p>
<button type="button" class="button button--small" data-order-add hidden>+ <?= __('Eintrag hinzufügen') ?></button>
<?php if ($orderError) : ?>
<div class="error-message" id="order-options-error"><?= h(implode(' ', (array)$orderError)) ?></div>
<?php endif; ?>
<?php if (!empty($hasResponses)) : ?>
<p class="hint"><?= __('Achtung: Umbenannte oder entfernte Einträge zählen bei bisherigen Antworten als falsch. Eine neue Reihenfolge gilt sofort für die Auswertung.') ?></p>
<?php endif; ?>
</fieldset>
<?= $this->Form->control('settings.ranking', [
'type' => 'checkbox',
'label' => __('Keine richtige Reihenfolge – Teilnehmende sortieren nach eigener Einschätzung (z. B. nach Wichtigkeit)'),
'checked' => (bool)$settings['ranking'],
]) ?>
<p class="hint"><?= __('Ohne Haken wird aufgelöst, sobald du die Abstimmung schließt: Dann siehst du, wie viele richtig lagen, und jede Person sieht, ob ihre Reihenfolge stimmt. Mit Haken zählt die Reihenfolge der Einträge oben nicht: Die Präsentation zeigt live die gemeinsame Rangfolge (nach dem durchschnittlichen Platz), Teilnehmende sehen kein Ergebnis.') ?></p>
<?php elseif ($slide->type === 'qa') :
$upvoteOptions = [];
foreach (range(1, \App\Model\Entity\Slide::QA_MAX_UPVOTES) as $n) {
$upvoteOptions[$n] = __n('{0} Stimme', '{0} Stimmen', $n, $n);
}
?>
<?php
$shareOptions = [];
foreach (\App\Model\Entity\Slide::QA_UPVOTE_SHARES as $share) {
$shareOptions[$share] = __('{0} % der Fragen', $share);
}
?>
<?= $this->Form->control('settings.upvote_share', [
'type' => 'select',
'options' => [0 => __('keine – ohne Abstimmung')] + $shareOptions,
'label' => __('Stimmen pro Person'),
'value' => $settings['upvote_share'],
'aria-describedby' => 'qa-upvotes-hint',
]) ?>
<p class="hint" id="qa-upvotes-hint"><?= __('Die Zahl der Stimmen hängt von der Zahl der Fragen ab: Bei 25 % und 12 Fragen hat jede Person 3 Stimmen (immer mindestens eine). Sie lassen sich auf Fragen anderer verteilen. Mit „keine“ entfällt die Abstimmung: Nach dem Sammeln werden die Fragen in der Reihenfolge besprochen, in der sie eingegangen sind.') ?></p>
<?= $this->Form->control('settings.max_upvotes_per_question', [
'type' => 'select',
'options' => [0 => __('unbegrenzt (bis alle Stimmen vergeben sind)')] + $upvoteOptions,
'label' => __('Höchstens pro Frage'),
'value' => $settings['max_upvotes_per_question'],
'aria-describedby' => 'qa-per-question-hint',
]) ?>
<p class="hint" id="qa-per-question-hint"><?= __('So viele Stimmen darf eine Person derselben Frage geben. „1 Stimme“ heißt: jede Frage höchstens einmal unterstützen. Mehrere Stimmen auf eine Frage geben ihr mehr Gewicht.') ?></p>
<?= $this->Form->control('settings.allow_self_upvote', [
'type' => 'checkbox',
'label' => __('Stimmen für eigene Fragen erlauben'),
'checked' => (bool)$settings['allow_self_upvote'],
'aria-describedby' => 'qa-self-upvote-hint',
]) ?>
<p class="hint" id="qa-self-upvote-hint"><?= __('Sinnvoll, wenn ihr Themen priorisiert („Was besprechen wir heute?“). Bei normalen Fragerunden lieber aus: Sonst landen oft die Fragen derjenigen vorn, die alle Stimmen sich selbst geben.') ?></p>
<?php if ($slide->qaStage() === \App\Model\Entity\Slide::QA_COLLECT) : ?>
<div class="input textarea">
<label for="prepared-text"><?= __('Vorab eingereichte Fragen (optional, eine pro Zeile, max. {0})', \App\Service\QaService::MAX_PREPARED) ?></label>
<textarea id="prepared-text" name="prepared_text" rows="5" aria-describedby="prepared-hint"><?= h($preparedText) ?></textarea>
<p class="hint" id="prepared-hint"><?= __('Z. B. Fragen, die dich vorab per E-Mail erreicht haben. Sie erscheinen wie Fragen der Teilnehmenden, ohne dass jemand sie bearbeiten kann. Gleiche Fragen werden nur einmal aufgenommen. Zeilen, die du hier entfernst, verschwinden wieder.') ?></p>
</div>
<?php endif; ?>
<p class="hint"><?= __('Ablauf in der Präsentation: 1. Fragen sammeln, 2. abstimmen, 3. besprechen – die Frage mit den meisten Upvotes zuerst. Ohne Upvotes entfällt Schritt 2. Du schaltest die Schritte selbst weiter.') ?></p>
<?php endif; ?>
<?= $this->element('slide_time_limit', ['slide' => $slide]) ?>
<div class="form-actions">
<?= $this->Form->button($isNew ? __('Folie anlegen') : __('Speichern'), ['class' => 'button button--primary']) ?>
<a class="button button--ghost" data-modal-close href="<?= $this->Url->build(['_name' => 'admin', 'token' => $adminToken]) ?>"><?= __('Abbrechen') ?></a>
</div>
<?= $this->Form->end() ?>
</section>