adds width option in percentage

This commit is contained in:
buttle 2021-10-06 13:04:26 +02:00
parent ea50a69804
commit 101a016e9e
2 changed files with 12 additions and 7 deletions

View File

@ -22,6 +22,13 @@ class Module extends AbstractModule
*/
];
const MODEL_WIDTH = [
'50' => '50 %',
'75' => '75 %',
'100' => '100 %',
];
public function getConfig()
{
return include __DIR__ . '/config/module.config.php';

View File

@ -22,13 +22,11 @@ class Render3DBlockForm extends Form
$this->add([
'name' => 'o:block[__blockIndex__][o:data][width]',
'type' => Element\Number::class,
'type' => Element\Select::class,
'options' => [
'label' => 'Width in pixels',
],
'attributes' => [
'min' => '100',
],
'label' => 'Width',
'value_options' => Module::MODEL_WIDTH,
],
]);
$this->add([
@ -54,7 +52,7 @@ class Render3DBlockForm extends Form
],
]);
*/
$this->add([
'name' => 'o:block[__blockIndex__][o:data][title]',
'type' => Element\Text::class,