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()
|
||||
{
|
||||
return include __DIR__ . '/config/module.config.php';
|
||||
|
|
|
@ -22,12 +22,10 @@ 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,
|
||||
],
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue