diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..208c814ec10efc0d6064d02b8acfdc5126b07df0 --- /dev/null +++ b/etc/adminhtml/system.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd"> + <system> + <section id="categorywidget" translate="label" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1"> + <class>separator-top</class> + <label>Image Slider Manager</label> + <tab>nicolasbejean</tab> + <resource>NicolasBejean_CategoryWidget::global</resource> + <group id="resize" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Image Resize Settings</label> + <comment>Default Resize Settings</comment> + <field id="constrain_only" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Constrain Only</label> + <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> + <comment>Guarantee, that image picture will not be bigger, than it was. It is false by default.</comment> + </field> + <field id="keep_aspect_ratio" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Keep Aspect Ratio</label> + <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> + <comment>Guarantee, that image picture width/height will not be distorted. It is true by default.</comment> + </field> + <field id="keep_transparency" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Keep Transparency</label> + <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> + <comment>Guarantee, that image will not lose transparency if any. It is true by default.</comment> + </field> + <field id="keep_frame" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Keep Frame</label> + <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> + <comment>Guarantee, that image will have dimensions, set in $width/$height. Not applicable, if keepAspectRatio(false).</comment> + </field> + <field id="background_color" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Background Color</label> + <comment>Default white</comment> + </field> + </group> + <group id="save" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Image Saved Settings</label> + <comment>Default Save Settings</comment> + <field id="identifier" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Identifier</label> + </field> + <field id="basename" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Basename</label> + </field> + <field id="width" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Width</label> + </field> + <field id="height" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Height</label> + </field> + <field id="compression" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Compression</label> + </field> + </group> + </section> + </system> +</config> diff --git a/etc/config.xml b/etc/config.xml new file mode 100644 index 0000000000000000000000000000000000000000..29466571a9bbe5d4d0e32e0e7ab492b7e58afb2c --- /dev/null +++ b/etc/config.xml @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd"> + <default> + <categorywidget> + <resize> + <constrain_only>0</constrain_only> + <keep_aspect_ratio>1</keep_aspect_ratio> + <keep_transparency>1</keep_transparency> + <keep_frame>1</keep_frame> + <background_color>#ffffff</background_color> + </resize> + <save> + <identifier>cw</identifier> + <basename></basename> + <width>1920</width> + <height>1080</height> + <compression>60</compression> + </save> + </categorywidget> + </default> +</config>