type)) { return; } $request = $this->getRequest(); $posted = $request->is(['post', 'put', 'patch']); $hasImage = $slide->hasImage(); // After a failed save the posted values are shown again. $layout = $posted && in_array($request->getData('image_layout'), Slide::IMAGE_LAYOUTS, true) ? (string)$request->getData('image_layout') : $slide->imageLayout(); $layouts = [ Slide::IMAGE_TOP => __('Oben (über den Antworten bzw. Ergebnissen)'), Slide::IMAGE_SIDE => __('Daneben (Bild links, Text und Ergebnis rechts)'), ]; if ($slide->type === Slide::TYPE_CONTENT) { $layouts[Slide::IMAGE_FULL] = __('Bildschirm füllen (Bild so groß wie möglich)'); } $imageError = $slide->getError('image'); $maxMb = (int)round((int)Configure::read('Plenario.images.maxUploadBytes', 10 * 1024 * 1024) / 1024 / 1024); ?>

<?= h((string)$slide->image_alt) ?>
Form->control('remove_image', [ 'type' => 'checkbox', 'label' => __('Bild entfernen'), 'value' => '1', 'hiddenField' => false, 'checked' => false, ]) ?>
>

Form->radio('image_layout', array_map( fn($value, $text) => ['value' => $value, 'text' => $text], array_keys($layouts), $layouts, ), ['value' => $layout]) ?>