diff --git a/Module.php b/Module.php index d94a574..c9b146e 100644 --- a/Module.php +++ b/Module.php @@ -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'; diff --git a/src/Form/Render3DBlockForm.php b/src/Form/Render3DBlockForm.php index 236b33f..b609ad7 100644 --- a/src/Form/Render3DBlockForm.php +++ b/src/Form/Render3DBlockForm.php @@ -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,