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'), ''],
Slide::IMAGE_SIDE => [__('Daneben'), ''],
];
if ($slide->type === Slide::TYPE_CONTENT) {
$layouts[Slide::IMAGE_FULL] = [__('Vollbild'), ''];
}
$imageError = $slide->getError('image');
$maxMb = (int)round((int)Configure::read('Plenario.images.maxUploadBytes', 10 * 1024 * 1024) / 1024 / 1024);
$imageUrl = $hasImage
? $this->Url->build(['_name' => 'participate:image', 'code' => $poll->join_code, 'file' => $slide->image])
: '';
?>
>