removed width input

This commit is contained in:
buttle 2021-09-07 11:07:47 +02:00
parent b77a5565d8
commit 275e237a5d
2 changed files with 0 additions and 19 deletions

View File

@ -10,15 +10,6 @@ class SmartGalleryBlockForm extends Form
public function init() public function init()
{ {
$this->add([
'name' => 'o:block[__blockIndex__][o:data][width]',
'type' => Element\Select::class,
'options' => [
'label' => 'Width',
'value_options' => Module::IMAGE_WIDTH,
],
]);
$this->add([ $this->add([
'type' => Element\Checkbox::class, 'type' => Element\Checkbox::class,
'name' => 'o:block[__blockIndex__][o:data][renderSourceLink]', 'name' => 'o:block[__blockIndex__][o:data][renderSourceLink]',

View File

@ -48,7 +48,6 @@ class SmartGallery extends AbstractBlockLayout
: $this->defaultSettings; : $this->defaultSettings;
$form->setData([ $form->setData([
'o:block[__blockIndex__][o:data][title]' => $data['title'], 'o:block[__blockIndex__][o:data][title]' => $data['title'],
'o:block[__blockIndex__][o:data][width]' => $data['width'],
'o:block[__blockIndex__][o:data][renderSourceLink]' => $data['renderSourceLink'], 'o:block[__blockIndex__][o:data][renderSourceLink]' => $data['renderSourceLink'],
]); ]);
$form->prepare(); $form->prepare();
@ -100,20 +99,11 @@ class SmartGallery extends AbstractBlockLayout
} }
} }
} }
$max_width = $block->dataValue('width');
return $view->partial('common/block-layout/smartGallery', [ return $view->partial('common/block-layout/smartGallery', [
'gallery_id' => 'ig_' . ++$gallery_id, 'gallery_id' => 'ig_' . ++$gallery_id,
'title' => $block->dataValue('title'), 'title' => $block->dataValue('title'),
//'item' => $item,
'images' => $images, 'images' => $images,
//'images' => $item->media(),
//'item_url' => $item_url,
'renderSourceLink' => $block->dataValue('renderSourceLink'), 'renderSourceLink' => $block->dataValue('renderSourceLink'),
'width' => $block->dataValue('width'),
'max_width' => $max_width,
]); ]);
} }
} }