Remove per-participant word limit from word clouds
Participants can now always submit any number of words. Drops the max_words setting, its form field, the limit checks in VoteService and the remaining/limitReached state; existing max_words values in stored settings are ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6cc813f87b
commit
bd17a97487
10 files changed
+26
-87
No files matched your search
@@ -51,14 +51,10 @@ $words = $state['words'] ?? null;
|
||||
<p class="muted"><?= nl2br(h($slide->description)) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($words !== null && $slide->is_voting_open && !$words['limitReached']) : ?>
|
||||
<?php if ($words !== null && $slide->is_voting_open) : ?>
|
||||
<?= $this->Form->create(null, ['url' => $voteUrl, 'class' => 'vote-form word-form', 'data-word-form' => true]) ?>
|
||||
<?= $this->Form->hidden('slide_id', ['value' => $slide->id]) ?>
|
||||
<p class="hint" data-words-remaining>
|
||||
<?= $words['remaining'] === null
|
||||
? __('Du kannst beliebig viele Begriffe abgeben.')
|
||||
: __n('Du kannst noch einen Begriff abgeben.', 'Du kannst noch {0} Begriffe abgeben.', $words['remaining'], $words['remaining']) ?>
|
||||
</p>
|
||||
<p class="hint"><?= __('Du kannst beliebig viele Begriffe abgeben.') ?></p>
|
||||
<div class="word-entry">
|
||||
<input type="text" name="word" maxlength="40" class="word-input" required autofocus
|
||||
autocomplete="off" autocapitalize="off" spellcheck="false"
|
||||
@@ -118,7 +114,7 @@ $words = $state['words'] ?? null;
|
||||
|
||||
<section class="card results-card" data-results-card <?= $state['results'] ? '' : 'hidden' ?>>
|
||||
<h2><?= $words !== null ? __('Wortwolke') : __('Ergebnisse') ?></h2>
|
||||
<?php if ($words !== null && $words['allowUpvotes'] && $slide->is_voting_open && !$words['limitReached']) : ?>
|
||||
<?php if ($words !== null && $words['allowUpvotes'] && $slide->is_voting_open) : ?>
|
||||
<p class="hint" data-upvote-hint><?= $words['allowDownvotes']
|
||||
? __('Tippe auf einen Begriff, um ihn zu unterstützen, oder auf „−“, um ihn abzulehnen.')
|
||||
: __('Tippe auf einen Begriff, um ihn zu unterstützen.') ?></p>
|
||||
|
||||
@@ -56,12 +56,6 @@ $optionsError = $slide->getError('options_text');
|
||||
'checked' => (bool)$settings['multiple'],
|
||||
]) ?>
|
||||
<?php elseif ($slide->type === 'wordcloud') : ?>
|
||||
<?= $this->Form->control('settings.max_words', [
|
||||
'type' => 'number', 'min' => 0, 'max' => 50,
|
||||
'label' => __('Begriffe pro Person (0 = unbegrenzt)'),
|
||||
'value' => $settings['max_words'],
|
||||
]) ?>
|
||||
<p class="hint"><?= __('Upvotes zählen mit: Wer einen vorhandenen Begriff unterstützt oder erneut eingibt, verbraucht einen Begriff.') ?></p>
|
||||
<?= $this->Form->control('settings.allow_upvotes', [
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Upvotes erlauben (Teilnehmende sehen die Wortwolke live und können Begriffe per Klick unterstützen)'),
|
||||
|
||||
Reference in new issue
Block a user