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'); ?>

← title)) ?>

typeLabel()) ?>

Form->create($slide, ['url' => $formUrl]) ?> Form->hidden('type') ?> Form->control('question', [ 'label' => $slide->type === 'content' ? __('Überschrift') : __('Frage'), 'maxlength' => 500, 'required' => true, 'autofocus' => $isNew, ]) ?> Form->control('description', [ 'type' => 'textarea', 'rows' => $slide->type === 'content' ? 6 : 2, 'label' => $slide->type === 'content' ? __('Text') : __('Beschreibung (optional)'), ]) ?> type === 'choice') : ?>

Form->control('settings.multiple', [ 'type' => 'checkbox', 'label' => __('Mehrfachauswahl erlauben'), 'checked' => (bool)$settings['multiple'], ]) ?> type === 'wordcloud') : ?> 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'], ]) ?> 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'], ]) ?> type === 'scale') : ?>
Form->control('settings.scale_min', [ 'type' => 'select', 'options' => [0 => '0', 1 => '1'], 'label' => __('Von'), 'value' => $settings['scale_min'], ]) ?> Form->control('settings.scale_max', [ 'type' => 'select', 'options' => array_combine(range(2, 10), range(2, 10)), 'label' => __('Bis'), 'value' => $settings['scale_max'], ]) ?> Form->control('settings.min_label', [ 'label' => __('Beschriftung links (optional)'), 'maxlength' => 60, 'placeholder' => __('z. B. gar nicht'), 'value' => $settings['min_label'], ]) ?> Form->control('settings.max_label', [ 'label' => __('Beschriftung rechts (optional)'), 'maxlength' => 60, 'placeholder' => __('z. B. sehr'), 'value' => $settings['max_label'], ]) ?>
isInteractive()) : ?> Form->control('is_voting_open', [ 'type' => 'checkbox', 'label' => __('Abstimmung geöffnet'), 'checked' => $isNew ? true : $slide->is_voting_open, ]) ?>
Form->button($isNew ? __('Folie anlegen') : __('Speichern'), ['class' => 'button button--primary']) ?>
Form->end() ?>