Merge pull request 'Add "Keine Angabe" to scales and an "Enthaltung" shortcut for choice slides' (#123) from feature/scale-no-answer into main
Reviewed-on: #123
This commit was merged in pull request #123.
This commit is contained in:
commit
6cdab11898
14 files changed
+195
-11
No files matched your search
@@ -146,6 +146,13 @@ geändert wird es nur über die Presenter-Steuerung (`SlideControlService`) bzw.
|
||||
(`Results.scaleLayout()` / `Results.donut()`). Setting `scale_view` (`Slide::SCALE_VIEWS`: `both` | `average` | `chart`,
|
||||
Dropdown im Formular) zeigt nur einen Teil, dann zentriert; im JSON `results.view`, die Daten bleiben vollständig.
|
||||
Gilt nur für Presenter/Embed, Auswertung und PDF zeigen immer beides.
|
||||
- **Keine Angabe** (Setting `allow_skip`, Standard aus): zweiter Button neben „Absenden“ (`skip=1`, `formnovalidate`). `VoteService::scaleRows()`
|
||||
speichert eine Zeile **ohne** `numeric_value` und ohne Kommentar: zählt als Teilnahme (einmal pro Person, `countParticipants`), geht aber nicht in
|
||||
Verteilung und Durchschnitt ein. `ResultsService::scaleResults()` liefert die Zahl separat als `skipped` (Bühne: „· N× keine Angabe“ unter der
|
||||
Bewertungszahl, Auswertung, PDF); private Folien strippen sie wie den Rest (`withoutContents()`). Ein Kommentar nachträglich geht nicht
|
||||
(`editText()` lehnt ab, `VoteService::hasSkipped()` blendet das Formular aus). Tests: `VoteServiceTest`, `ParticipateControllerTest`.
|
||||
- **Enthaltung bei Auswahlfolien:** kein eigenes Feature, sondern eine normale Option (zählt in Prozenten mit, wie bei Vereinsabstimmungen üblich).
|
||||
Im Folienformular fügt der Button „Option ‚Enthaltung‘ hinzufügen“ (`data-add-option`, `initAddOption()` in `plenario.js`, idempotent, nur mit JS sichtbar) die Zeile ein.
|
||||
- **Antwort nachträglich bearbeiten** (gegen Tippfehler, `VoteService::hasEditableText()`): Antwort einer offenen Frage
|
||||
(darf nicht leer werden) bzw. Kommentar einer Skala (ändern, ergänzen, leeren; die Bewertung bleibt unveränderlich),
|
||||
nur solange die Abstimmung offen ist. `participate:edit` → `VoteService::editText()`, gleiche Vorbedingungen wie
|
||||
|
||||
@@ -93,11 +93,14 @@ class ParticipateController extends AppController
|
||||
$slide = $poll->is_active ? $stateService->currentSlide($poll) : null;
|
||||
$participantHash = $this->participantHash($poll);
|
||||
$state = $stateService->forParticipant($poll, $participantHash, $slide);
|
||||
$voteService = new VoteService();
|
||||
$ownText = $slide !== null && VoteService::hasEditableText($slide) && $state['hasResponded']
|
||||
? (new VoteService())->ownText($slide, $participantHash)
|
||||
? $voteService->ownText($slide, $participantHash)
|
||||
: null;
|
||||
// "Keine Angabe" has no rating to comment on
|
||||
$skipped = $slide !== null && $state['hasResponded'] && $voteService->hasSkipped($slide, $participantHash);
|
||||
|
||||
$this->set(compact('poll', 'slide', 'state', 'participantHash', 'ownText'));
|
||||
$this->set(compact('poll', 'slide', 'state', 'participantHash', 'ownText', 'skipped'));
|
||||
$this->setPollInterval();
|
||||
}
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ class Slide extends Entity
|
||||
// private: internal feedback, ratings only visible in the admin area (never on the stage)
|
||||
// comments: optional comment field, comments rotate in the presentation (unless private)
|
||||
// comment_ratings: show the rating next to each comment in the presentation
|
||||
// allow_skip: participants may answer "Keine Angabe" (row without numeric_value, not part of the average)
|
||||
// (time per comment depends on its length, see Comments.delay() in plenario.js)
|
||||
// style: numbers or stars (SCALE_*), stars always start at scale_min = 1
|
||||
// scale_view: parts of the result shown in the presentation (presenter/embed, SCALE_VIEWS);
|
||||
@@ -130,7 +131,7 @@ class Slide extends Entity
|
||||
self::TYPE_SCALE => [
|
||||
'style' => self::SCALE_NUMBERS,
|
||||
'scale_min' => 1, 'scale_max' => 5, 'min_label' => '', 'max_label' => '', 'private' => false,
|
||||
'comments' => false, 'comment_ratings' => false,
|
||||
'comments' => false, 'comment_ratings' => false, 'allow_skip' => false,
|
||||
'scale_view' => self::SCALE_VIEW_BOTH,
|
||||
'time_limit' => 0,
|
||||
],
|
||||
|
||||
@@ -177,6 +177,7 @@ class SlidesTable extends Table
|
||||
$settings['private'] = filter_var($input['private'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
$settings['comments'] = filter_var($input['comments'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
$settings['comment_ratings'] = filter_var($input['comment_ratings'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
$settings['allow_skip'] = filter_var($input['allow_skip'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
$view = $input['scale_view'] ?? null;
|
||||
$settings['scale_view'] = in_array($view, Slide::SCALE_VIEWS, true) ? $view : Slide::SCALE_VIEW_BOTH;
|
||||
break;
|
||||
|
||||
@@ -21,6 +21,7 @@ use Cake\ORM\Locator\LocatorAwareTrait;
|
||||
* - open: 'answers' => [['text', 'created']] newest first, 'private' (bool);
|
||||
* - scale: 'buckets' => [['value', 'count', 'percent']], 'average' => float|null,
|
||||
* 'min', 'max', 'minLabel', 'maxLabel', 'private' (bool), 'stars' (bool: star rating, min = 1);
|
||||
* 'skipped' (int: answers "Keine Angabe", setting allow_skip; not part of buckets/average);
|
||||
* 'comments' => [['id', 'text', 'value' (int|null)]] oldest first (only with the comment field, else [];
|
||||
* 'value' is null unless the setting comment_ratings is on;
|
||||
* 'view' (both|average|chart): parts shown in the presentation (setting scale_view,
|
||||
@@ -486,6 +487,7 @@ class ResultsService
|
||||
if (isset($results['buckets'])) {
|
||||
$results['buckets'] = [];
|
||||
$results['average'] = null;
|
||||
$results['skipped'] = 0;
|
||||
$results['comments'] = [];
|
||||
}
|
||||
|
||||
@@ -530,7 +532,7 @@ class ResultsService
|
||||
* Distribution and average of a scale.
|
||||
*
|
||||
* @param \App\Model\Entity\Slide $slide Scale slide
|
||||
* @return array{buckets: list<array{value: int, count: int, percent: float|int}>, average: float|null, min: int, max: int, minLabel: string, maxLabel: string, stars: bool}
|
||||
* @return array{buckets: list<array{value: int, count: int, percent: float|int}>, average: float|null, min: int, max: int, minLabel: string, maxLabel: string, stars: bool, skipped: int}
|
||||
*/
|
||||
public function scaleResults(Slide $slide): array
|
||||
{
|
||||
@@ -545,6 +547,11 @@ class ResultsService
|
||||
->combine('numeric_value', 'n')
|
||||
->toArray();
|
||||
|
||||
// "Keine Angabe": taking part without a rating, never part of the average or the distribution
|
||||
$skipped = $slide->setting('allow_skip')
|
||||
? $this->Responses->find()->where(['slide_id' => $slide->id, 'numeric_value IS' => null])->count()
|
||||
: 0;
|
||||
|
||||
$total = 0;
|
||||
$sum = 0;
|
||||
foreach ($counts as $value => $count) {
|
||||
@@ -569,6 +576,7 @@ class ResultsService
|
||||
'minLabel' => (string)$slide->setting('min_label'),
|
||||
'maxLabel' => (string)$slide->setting('max_label'),
|
||||
'stars' => $slide->isStarRating(),
|
||||
'skipped' => $skipped,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -179,6 +179,9 @@ class VoteService
|
||||
default => __('Bitte gib zuerst deine Bewertung ab.'),
|
||||
});
|
||||
}
|
||||
if ($slide->type === Slide::TYPE_SCALE && $row->numeric_value === null) {
|
||||
throw new VoteException(__('Zu „Keine Angabe“ gibt es keinen Kommentar.'));
|
||||
}
|
||||
$row->text_value = $text;
|
||||
$this->Responses->saveOrFail($row);
|
||||
});
|
||||
@@ -203,6 +206,22 @@ class VoteService
|
||||
return $row['text_value'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the participant answered a scale with "Keine Angabe" (a row without rating).
|
||||
*
|
||||
* @param \App\Model\Entity\Slide $slide Slide
|
||||
* @param string $participantHash Participant hash
|
||||
* @return bool
|
||||
*/
|
||||
public function hasSkipped(Slide $slide, string $participantHash): bool
|
||||
{
|
||||
return $slide->type === Slide::TYPE_SCALE && $this->Responses->exists([
|
||||
'slide_id' => $slide->id,
|
||||
'participant_hash' => $participantHash,
|
||||
'numeric_value IS' => null,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Poll active, slide live and interactive, voting open.
|
||||
*
|
||||
@@ -682,6 +701,14 @@ class VoteService
|
||||
*/
|
||||
protected function scaleRows(Slide $slide, array $data): array
|
||||
{
|
||||
if (self::stringField($data, 'skip') === '1') {
|
||||
if (!$slide->setting('allow_skip')) {
|
||||
throw new VoteException(__('„Keine Angabe“ ist bei dieser Frage nicht möglich.'));
|
||||
}
|
||||
|
||||
// Counts as taking part, but has no rating and no comment.
|
||||
return [['numeric_value' => null, 'text_value' => null]];
|
||||
}
|
||||
$value = filter_var($data['value'] ?? null, FILTER_VALIDATE_INT);
|
||||
$min = (int)$slide->setting('scale_min');
|
||||
$max = (int)$slide->setting('scale_max');
|
||||
|
||||
@@ -205,6 +205,9 @@ $bar = function (float $percent, bool $ok = false): string {
|
||||
<span class="muted"><?= !empty($r['stars'])
|
||||
? __('von {0} Sternen', (int)$r['max'])
|
||||
: __('auf einer Skala von {0} bis {1}', (int)$r['min'], (int)$r['max']) ?></span>
|
||||
<?php if (!empty($r['skipped'])) : ?>
|
||||
· <span class="muted"><?= __('{0}× „Keine Angabe“ (nicht im Durchschnitt)', (int)$r['skipped']) ?></span>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
<table>
|
||||
<thead><tr><th><?= !empty($r['stars']) ? __('Sterne') : __('Wert') ?></th><th class="num"><?= __('Anzahl') ?></th><th class="num"><?= __('Anteil') ?></th><th></th></tr></thead>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* @var array<string, mixed> $state
|
||||
* @var string $participantHash Seed for the shuffled items of ordering slides
|
||||
* @var string|null $ownText Own open answer or scale comment (editable while voting is open)
|
||||
* @var bool $skipped Whether the participant answered the scale with "Keine Angabe"
|
||||
* @var int $pollIntervalMs
|
||||
*/
|
||||
use App\Service\VoteService;
|
||||
@@ -241,7 +242,7 @@ $countdown = function (?int $remaining): string {
|
||||
</div>
|
||||
<?php elseif ($state['hasResponded']) : ?>
|
||||
<p class="done">✓ <?= __('Deine Antwort ist angekommen.') ?></p>
|
||||
<?php if (VoteService::hasEditableText($slide) && $slide->isVotingOpen()) :
|
||||
<?php if (VoteService::hasEditableText($slide) && $slide->isVotingOpen() && !$skipped) :
|
||||
$isOpen = $slide->type === 'open'; ?>
|
||||
<?php if ($ownText !== null) : ?>
|
||||
<p class="own-comment__label"><?= $isOpen ? __('Deine Antwort:') : __('Dein Kommentar:') ?></p>
|
||||
@@ -342,6 +343,12 @@ $countdown = function (?int $remaining): string {
|
||||
<?php endif; ?>
|
||||
|
||||
<?= $this->Form->button(__('Absenden'), ['class' => 'button button--primary button--block']) ?>
|
||||
<?php if ($slide->type === 'scale' && $slide->setting('allow_skip')) : ?>
|
||||
<?= $this->Form->button(__('Keine Angabe'), [
|
||||
'name' => 'skip', 'value' => '1', 'formnovalidate' => true,
|
||||
'class' => 'button button--block button--skip',
|
||||
]) ?>
|
||||
<?php endif; ?>
|
||||
<?= $this->Form->end() ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -31,7 +31,7 @@ $count = match (true) {
|
||||
</p>
|
||||
<h1 id="modal-title"><?= h($slide->question) ?></h1>
|
||||
<?php if ($scale !== null) : ?>
|
||||
<p class="muted"><?= __n('{0} Bewertung', '{0} Bewertungen', $count, $count) ?></p>
|
||||
<p class="muted"><?= __n('{0} Bewertung', '{0} Bewertungen', $count, $count) ?><?php if (!empty($scale['skipped'])) : ?> · <?= __('{0}× „Keine Angabe“', (int)$scale['skipped']) ?><?php endif; ?></p>
|
||||
<?php elseif ($isChoice) : ?>
|
||||
<p class="muted"><?= __n('{0} Kommentar, neueste zuerst', '{0} Kommentare, neueste zuerst', $count, $count) ?></p>
|
||||
<?php else : ?>
|
||||
|
||||
@@ -122,6 +122,10 @@ $optionsError = $slide->getError('options_text');
|
||||
<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; ?>
|
||||
@@ -191,6 +195,12 @@ $optionsError = $slide->getError('options_text');
|
||||
'placeholder' => __('z. B. sehr'), 'value' => $settings['max_label'],
|
||||
]) ?>
|
||||
</div>
|
||||
<?= $this->Form->control('settings.allow_skip', [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('„Keine Angabe“ erlauben (Teilnehmende können die Frage überspringen)'),
|
||||
'checked' => (bool)$settings['allow_skip'],
|
||||
]) ?>
|
||||
<p class="hint"><?= __('Wer „Keine Angabe“ wählt, zählt als Teilnehmer/in, geht aber nicht in Durchschnitt und Verteilung ein. Die Zahl steht separat dabei.') ?></p>
|
||||
<?= $this->Form->control('settings.scale_view', [
|
||||
'type' => 'select',
|
||||
'label' => __('In der Präsentation zeigen'),
|
||||
|
||||
@@ -238,4 +238,30 @@ class ParticipateControllerTest extends TestCase
|
||||
$this->assertFlashMessage('Diese Antwort kann nicht mehr geändert werden.');
|
||||
$this->assertFalse(TableRegistry::getTableLocator()->get('Responses')->exists(['text_value' => 'Hack']));
|
||||
}
|
||||
|
||||
public function testScaleSkipButtonOnlyWithSetting(): void
|
||||
{
|
||||
[$poll] = $this->createPoll();
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE);
|
||||
$this->goLive($poll, $slide);
|
||||
$this->cookie('plenario_pid', self::PID);
|
||||
$this->get('/p/' . $poll->join_code);
|
||||
$this->assertResponseNotContains('Keine Angabe');
|
||||
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE, ['settings' => ['allow_skip' => true, 'comments' => true]]);
|
||||
$this->goLive($poll, $slide);
|
||||
$this->cookie('plenario_pid', self::PID);
|
||||
$this->get('/p/' . $poll->join_code);
|
||||
$this->assertResponseContains('name="skip"');
|
||||
|
||||
$this->cookie('plenario_pid', self::PID);
|
||||
$this->post("/p/{$poll->join_code}/vote", ['slide_id' => $slide->id, 'skip' => '1']);
|
||||
$this->assertFlashMessage('Danke für deine Antwort!');
|
||||
|
||||
// No rating, so no comment to add afterwards.
|
||||
$this->cookie('plenario_pid', self::PID);
|
||||
$this->get('/p/' . $poll->join_code);
|
||||
$this->assertResponseContains('Deine Antwort ist angekommen.');
|
||||
$this->assertResponseNotContains('Kommentar hinzufügen');
|
||||
}
|
||||
}
|
||||
@@ -71,6 +71,51 @@ class VoteServiceTest extends TestCase
|
||||
(new VoteService())->submit($poll, $slide, 'p1', ['value' => '4']);
|
||||
}
|
||||
|
||||
public function testScaleSkipCountsAsParticipantButNotInAverage(): void
|
||||
{
|
||||
[$poll] = $this->createPoll();
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE, ['settings' => ['scale_min' => 1, 'scale_max' => 5, 'allow_skip' => true]]);
|
||||
$poll = $this->goLive($poll, $slide);
|
||||
$service = new VoteService();
|
||||
$service->submit($poll, $slide, 'p1', ['value' => '4']);
|
||||
$service->submit($poll, $slide, 'p2', ['skip' => '1']);
|
||||
|
||||
$results = (new ResultsService())->forSlide($slide);
|
||||
$this->assertSame(2, $results['participants']);
|
||||
$this->assertSame(1, $results['skipped']);
|
||||
$this->assertSame(4.0, (float)$results['average']);
|
||||
$this->assertSame(1, array_sum(array_column($results['buckets'], 'count')));
|
||||
$this->assertTrue($service->hasSkipped($slide, 'p2'));
|
||||
$this->assertFalse($service->hasSkipped($slide, 'p1'));
|
||||
|
||||
// Only once per person, like any answer.
|
||||
$this->expectExceptionMessage('bereits abgestimmt');
|
||||
$service->submit($poll, $slide, 'p2', ['value' => '2']);
|
||||
}
|
||||
|
||||
public function testScaleSkipNeedsTheSetting(): void
|
||||
{
|
||||
[$poll] = $this->createPoll();
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE);
|
||||
$poll = $this->goLive($poll, $slide);
|
||||
|
||||
$this->expectExceptionMessage('nicht möglich');
|
||||
(new VoteService())->submit($poll, $slide, 'p1', ['skip' => '1']);
|
||||
}
|
||||
|
||||
public function testScaleSkipHasNoComment(): void
|
||||
{
|
||||
[$poll] = $this->createPoll();
|
||||
$slide = $this->createSlide($poll, Slide::TYPE_SCALE, ['settings' => ['allow_skip' => true, 'comments' => true]]);
|
||||
$poll = $this->goLive($poll, $slide);
|
||||
$service = new VoteService();
|
||||
$service->submit($poll, $slide, 'p1', ['skip' => '1', 'comment' => 'Ignoriert']);
|
||||
|
||||
$this->assertNull($service->ownText($slide, 'p1'));
|
||||
$this->expectExceptionMessage('keinen Kommentar');
|
||||
$service->editText($poll, $slide, 'p1', ['comment' => 'Nachtrag']);
|
||||
}
|
||||
|
||||
public function testMultipleChoiceResults(): void
|
||||
{
|
||||
[$poll] = $this->createPoll();
|
||||
|
||||
@@ -225,6 +225,7 @@ h3 { font-size: 1.05rem; margin-top: 1.6em; }
|
||||
.button--danger { color: var(--danger); }
|
||||
.button--danger:hover { border-color: var(--danger); }
|
||||
.button--ghost { border-color: transparent; background: transparent; }
|
||||
.button--skip { margin-top: 8px; }
|
||||
.button--small { padding: 6px 10px; font-size: .85rem; }
|
||||
.header-tools { display: flex; align-items: center; gap: 8px; }
|
||||
.button--block { width: 100%; padding: 14px; font-size: 1.05rem; }
|
||||
|
||||
+50
-5
@@ -794,7 +794,11 @@
|
||||
el('span', { class: 'average__of', text: ofText })
|
||||
]),
|
||||
visual,
|
||||
el('span', { class: 'average__count', text: total + (total === 1 ? ' Bewertung' : ' Bewertungen') })
|
||||
el('span', {
|
||||
class: 'average__count',
|
||||
text: total + (total === 1 ? ' Bewertung' : ' Bewertungen')
|
||||
+ (results.skipped ? ' · ' + results.skipped + '× keine Angabe' : '')
|
||||
})
|
||||
]);
|
||||
},
|
||||
|
||||
@@ -2841,6 +2845,45 @@
|
||||
update();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------ quick option (choice form)
|
||||
|
||||
/**
|
||||
* Button that appends a ready-made option (e.g. "Enthaltung") to the option textarea.
|
||||
* Idempotent: an existing line with the same text is not added again; the maximum is respected.
|
||||
*/
|
||||
function initAddOption(button) {
|
||||
var area = document.getElementById(button.getAttribute('data-add-option-target'));
|
||||
if (!area) {
|
||||
return;
|
||||
}
|
||||
var label = button.getAttribute('data-add-option');
|
||||
var max = parseInt(button.getAttribute('data-add-option-max'), 10) || 20;
|
||||
|
||||
function lines() {
|
||||
return area.value.split(/\r?\n/).map(function (line) { return line.trim(); }).filter(Boolean);
|
||||
}
|
||||
|
||||
function update() {
|
||||
var current = lines();
|
||||
var present = current.some(function (line) { return line.toLowerCase() === label.toLowerCase(); });
|
||||
button.disabled = present || current.length >= max;
|
||||
}
|
||||
|
||||
button.hidden = false;
|
||||
button.addEventListener('click', function () {
|
||||
var current = lines();
|
||||
if (button.disabled) {
|
||||
return;
|
||||
}
|
||||
current.push(label);
|
||||
area.value = current.join('\n');
|
||||
update();
|
||||
area.focus();
|
||||
});
|
||||
area.addEventListener('input', update);
|
||||
update();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------ theme switch
|
||||
|
||||
var THEME_ICONS = { auto: '◐', light: '☀', dark: '☾' };
|
||||
@@ -3163,6 +3206,7 @@
|
||||
root.querySelectorAll('[data-sortable]').forEach(initSortable);
|
||||
root.querySelectorAll('[data-order-options]').forEach(initOrderOptions);
|
||||
root.querySelectorAll('[data-scale-style]').forEach(initScaleStyle);
|
||||
root.querySelectorAll('[data-add-option]').forEach(initAddOption);
|
||||
}
|
||||
|
||||
// Flash messages: click hides them (delegated, no inline handlers because of the CSP).
|
||||
@@ -3290,10 +3334,11 @@
|
||||
if (event.defaultPrevented) {
|
||||
return; // handled via fetch (word cloud)
|
||||
}
|
||||
var button = form.querySelector('button[type=submit], button:not([type])');
|
||||
if (button) {
|
||||
setTimeout(function () { button.disabled = true; }, 0);
|
||||
}
|
||||
// All buttons (e.g. "Absenden" and "Keine Angabe"); the pressed one is already part of the request.
|
||||
var buttons = form.querySelectorAll('button[type=submit], button:not([type])');
|
||||
setTimeout(function () {
|
||||
buttons.forEach(function (button) { button.disabled = true; });
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user