Skip to content

Commit a441410

Browse files
committed
Hide imgproxy settings if catalog url format is set to legacy
1 parent 7a42b81 commit a441410

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

etc/adminhtml/system.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<field id="catalog_media_url_format_custom_pattern" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="0">
1414
<label>Custom URL format</label>
1515
<depends>
16+
<field id="catalog_media_url_format">image_optimization_parameters</field>
1617
<field id="catalog_media_url_format_custom_type">pattern</field>
1718
</depends>
1819
<comment><![CDATA[Custom format to add dynamic parameters.<br/>
@@ -23,36 +24,40 @@
2324
<field id="catalog_media_url_format_custom_imgproxy_host" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="0">
2425
<label>Imgproxy Host</label>
2526
<depends>
27+
<field id="catalog_media_url_format">image_optimization_parameters</field>
2628
<field id="catalog_media_url_format_custom_type">imgproxy</field>
2729
</depends>
2830
<comment><![CDATA[The host the Imgproxy instance can be reached, eg https://example.com:8080/]]></comment>
2931
</field>
3032
<field id="catalog_media_url_format_custom_imgproxy_key" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="0">
3133
<label>Imgproxy Key</label>
3234
<depends>
35+
<field id="catalog_media_url_format">image_optimization_parameters</field>
3336
<field id="catalog_media_url_format_custom_type">imgproxy</field>
3437
</depends>
3538
<comment><![CDATA[The IMGPROXY_KEY value, if signing is required]]></comment>
3639
</field>
3740
<field id="catalog_media_url_format_custom_imgproxy_salt" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="0">
3841
<label>Imgproxy Salt</label>
3942
<depends>
43+
<field id="catalog_media_url_format">image_optimization_parameters</field>
4044
<field id="catalog_media_url_format_custom_type">imgproxy</field>
4145
</depends>
4246
<comment><![CDATA[The IMGPROXY_SALT value, if signing is required]]></comment>
4347
</field>
4448
<field id="catalog_media_url_format_custom_imgproxy_resize" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="0">
4549
<label>Imgproxy Resize Type</label>
4650
<depends>
51+
<field id="catalog_media_url_format">image_optimization_parameters</field>
4752
<field id="catalog_media_url_format_custom_type">imgproxy</field>
4853
</depends>
4954
<source_model>Fruitcake\CustomImageUrl\Model\Config\Source\ImgproxyResizeType</source_model>
50-
5155
<comment><![CDATA[The Resize type]]></comment>
5256
</field>
5357
<field id="catalog_media_url_format_custom_imgproxy_source_type" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="0">
5458
<label>Imgproxy Source Type</label>
5559
<depends>
60+
<field id="catalog_media_url_format">image_optimization_parameters</field>
5661
<field id="catalog_media_url_format_custom_type">imgproxy</field>
5762
</depends>
5863
<source_model>Fruitcake\CustomImageUrl\Model\Config\Source\ImgproxySourceType</source_model>
@@ -61,6 +66,7 @@
6166
<field id="catalog_media_url_format_custom_imgproxy_source_prefix" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="0">
6267
<label>Imgproxy Source Prefix</label>
6368
<depends>
69+
<field id="catalog_media_url_format">image_optimization_parameters</field>
6470
<field id="catalog_media_url_format_custom_type">imgproxy</field>
6571
<field id="catalog_media_url_format_custom_imgproxy_source_type" separator=",">local,s3</field>
6672
</depends>
@@ -69,6 +75,7 @@
6975
<field id="catalog_media_url_format_custom_imgproxy_source_custom_url" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="0">
7076
<label>Imgproxy Source Custom URL</label>
7177
<depends>
78+
<field id="catalog_media_url_format">image_optimization_parameters</field>
7279
<field id="catalog_media_url_format_custom_type">imgproxy</field>
7380
<field id="catalog_media_url_format_custom_imgproxy_source_type" separator=",">custom_url</field>
7481
</depends>

0 commit comments

Comments
 (0)