adds width option in percentage
This commit is contained in:
parent
ea50a69804
commit
101a016e9e
|
@ -22,6 +22,13 @@ class Module extends AbstractModule
|
||||||
*/
|
*/
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const MODEL_WIDTH = [
|
||||||
|
'50' => '50 %',
|
||||||
|
'75' => '75 %',
|
||||||
|
'100' => '100 %',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
public function getConfig()
|
public function getConfig()
|
||||||
{
|
{
|
||||||
return include __DIR__ . '/config/module.config.php';
|
return include __DIR__ . '/config/module.config.php';
|
||||||
|
|
|
@ -22,13 +22,11 @@ class Render3DBlockForm extends Form
|
||||||
|
|
||||||
$this->add([
|
$this->add([
|
||||||
'name' => 'o:block[__blockIndex__][o:data][width]',
|
'name' => 'o:block[__blockIndex__][o:data][width]',
|
||||||
'type' => Element\Number::class,
|
'type' => Element\Select::class,
|
||||||
'options' => [
|
'options' => [
|
||||||
'label' => 'Width in pixels',
|
'label' => 'Width',
|
||||||
],
|
'value_options' => Module::MODEL_WIDTH,
|
||||||
'attributes' => [
|
],
|
||||||
'min' => '100',
|
|
||||||
],
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->add([
|
$this->add([
|
||||||
|
|
Loading…
Reference in New Issue