Skip to content

Commit ca79edf

Browse files
committed
Fix #100 wrong config depends fields
1 parent 3fe16b8 commit ca79edf

File tree

7 files changed

+135
-75
lines changed

7 files changed

+135
-75
lines changed

etc/adminhtml/menu.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
99
<menu>
1010
<add id="Opengento_Gdpr::gdpr" title="GDPR" translate="title" module="Opengento_Gdpr" resource="Opengento_Gdpr::gdpr" parent="Magento_Backend::stores" sortOrder="100" dependsOnConfig="gdpr/general/enabled"/>
11-
<add id="Opengento_Gdpr::gdpr_actions" title="Action Logs" translate="title" module="Opengento_Gdpr" action="gdpr/action/index" resource="Opengento_Gdpr::gdpr_actions" parent="Opengento_Gdpr::gdpr" sortOrder="10"/>
11+
<add id="Opengento_Gdpr::gdpr_actions" title="Action Logs" translate="title" module="Opengento_Gdpr" action="gdpr/action/index" resource="Opengento_Gdpr::gdpr_actions" parent="Opengento_Gdpr::gdpr" sortOrder="10" dependsOnConfig="gdpr/general/enabled"/>
1212
</menu>
1313
</config>

etc/adminhtml/system/action.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
<resource>Opengento_Gdpr::config</resource>
1414
<group id="action" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="10">
1515
<label>Action Settings</label>
16-
<depends>
17-
<field id="gdpr/general/enabled">1</field>
18-
</depends>
1916
</group>
2017
</section>
2118
</include>

etc/adminhtml/system/cookie.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
<resource>Opengento_Gdpr::config</resource>
1414
<group id="cookie" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="10">
1515
<label>Cookie Settings</label>
16-
<depends>
17-
<field id="gdpr/general/enabled">1</field>
18-
</depends>
1916
<field id="enabled" type="select" translate="label comment" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="10">
2017
<label>Cookie Disclosure</label>
2118
<comment>It will enable the cookie disclosure popin to the storefront.</comment>
@@ -26,7 +23,7 @@
2623
<label>Information</label>
2724
<source_model>Magento\Cms\Model\Config\Source\Block</source_model>
2825
<depends>
29-
<field id="gdpr/cookie/enabled">1</field>
26+
<field id="opengento_gdpr_cookie/cookie/enabled">1</field>
3027
</depends>
3128
<config_path>gdpr/cookie/block_id</config_path>
3229
</field>

etc/adminhtml/system/erasure.xml

Lines changed: 29 additions & 32 deletions
Large diffs are not rendered by default.

etc/adminhtml/system/export.xml

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
<resource>Opengento_Gdpr::config</resource>
1414
<group id="export" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="10">
1515
<label>Export Settings</label>
16-
<depends>
17-
<field id="gdpr/general/enabled">1</field>
18-
</depends>
1916
<field id="enabled" type="select" translate="label comment" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="10">
2017
<label>Export</label>
2118
<comment>It will enable the export action to the storefront.</comment>
@@ -27,7 +24,7 @@
2724
<label>Information</label>
2825
<source_model>Magento\Cms\Model\Config\Source\Block</source_model>
2926
<depends>
30-
<field id="gdpr/export/enabled">1</field>
27+
<field id="opengento_gdpr_export/export/enabled">1</field>
3128
</depends>
3229
<config_path>gdpr/export/block_id</config_path>
3330
</field>
@@ -37,7 +34,7 @@
3734
<source_model>Opengento\Gdpr\Model\Config\Source\ExportRenderer</source_model>
3835
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
3936
<depends>
40-
<field id="gdpr/export/enabled">1</field>
37+
<field id="opengento_gdpr_export/export/enabled">1</field>
4138
</depends>
4239
<config_path>gdpr/export/renderers</config_path>
4340
</field>
@@ -84,7 +81,7 @@
8481
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
8582
<can_be_empty>1</can_be_empty>
8683
<depends>
87-
<field id="gdpr/export/enabled">1</field>
84+
<field id="opengento_gdpr_export/export/enabled">1</field>
8885
</depends>
8986
<config_path>gdpr/export/customer_attributes</config_path>
9087
</field>
@@ -94,7 +91,7 @@
9491
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
9592
<can_be_empty>1</can_be_empty>
9693
<depends>
97-
<field id="gdpr/export/enabled">1</field>
94+
<field id="opengento_gdpr_export/export/enabled">1</field>
9895
</depends>
9996
<config_path>gdpr/export/customer_custom_attributes</config_path>
10097
</field>
@@ -104,7 +101,7 @@
104101
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
105102
<can_be_empty>1</can_be_empty>
106103
<depends>
107-
<field id="gdpr/export/enabled">1</field>
104+
<field id="opengento_gdpr_export/export/enabled">1</field>
108105
</depends>
109106
<config_path>gdpr/export/customer_extensible_data</config_path>
110107
</field>
@@ -118,7 +115,7 @@
118115
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
119116
<can_be_empty>1</can_be_empty>
120117
<depends>
121-
<field id="gdpr/export/enabled">1</field>
118+
<field id="opengento_gdpr_export/export/enabled">1</field>
122119
</depends>
123120
<config_path>gdpr/export/customer_address_attributes</config_path>
124121
</field>
@@ -128,7 +125,7 @@
128125
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
129126
<can_be_empty>1</can_be_empty>
130127
<depends>
131-
<field id="gdpr/export/enabled">1</field>
128+
<field id="opengento_gdpr_export/export/enabled">1</field>
132129
</depends>
133130
<config_path>gdpr/export/customer_address_custom_attributes</config_path>
134131
</field>
@@ -138,7 +135,7 @@
138135
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
139136
<can_be_empty>1</can_be_empty>
140137
<depends>
141-
<field id="gdpr/export/enabled">1</field>
138+
<field id="opengento_gdpr_export/export/enabled">1</field>
142139
</depends>
143140
<config_path>gdpr/export/customer_address_extensible_data</config_path>
144141
</field>
@@ -151,7 +148,7 @@
151148
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
152149
<can_be_empty>1</can_be_empty>
153150
<depends>
154-
<field id="gdpr/export/enabled">1</field>
151+
<field id="opengento_gdpr_export/export/enabled">1</field>
155152
</depends>
156153
<config_path>gdpr/export/quote_attributes</config_path>
157154
</field>
@@ -161,7 +158,7 @@
161158
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
162159
<can_be_empty>1</can_be_empty>
163160
<depends>
164-
<field id="gdpr/export/enabled">1</field>
161+
<field id="opengento_gdpr_export/export/enabled">1</field>
165162
</depends>
166163
<config_path>gdpr/export/quote_custom_attributes</config_path>
167164
</field>
@@ -171,7 +168,7 @@
171168
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
172169
<can_be_empty>1</can_be_empty>
173170
<depends>
174-
<field id="gdpr/export/enabled">1</field>
171+
<field id="opengento_gdpr_export/export/enabled">1</field>
175172
</depends>
176173
<config_path>gdpr/export/quote_extensible_data</config_path>
177174
</field>
@@ -184,7 +181,7 @@
184181
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
185182
<can_be_empty>1</can_be_empty>
186183
<depends>
187-
<field id="gdpr/export/enabled">1</field>
184+
<field id="opengento_gdpr_export/export/enabled">1</field>
188185
</depends>
189186
<config_path>gdpr/export/quote_address_attributes</config_path>
190187
</field>
@@ -194,7 +191,7 @@
194191
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
195192
<can_be_empty>1</can_be_empty>
196193
<depends>
197-
<field id="gdpr/export/enabled">1</field>
194+
<field id="opengento_gdpr_export/export/enabled">1</field>
198195
</depends>
199196
<config_path>gdpr/export/quote_address_custom_attributes</config_path>
200197
</field>
@@ -204,7 +201,7 @@
204201
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
205202
<can_be_empty>1</can_be_empty>
206203
<depends>
207-
<field id="gdpr/export/enabled">1</field>
204+
<field id="opengento_gdpr_export/export/enabled">1</field>
208205
</depends>
209206
<config_path>gdpr/export/quote_address_extensible_data</config_path>
210207
</field>
@@ -217,7 +214,7 @@
217214
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
218215
<can_be_empty>1</can_be_empty>
219216
<depends>
220-
<field id="gdpr/export/enabled">1</field>
217+
<field id="opengento_gdpr_export/export/enabled">1</field>
221218
</depends>
222219
<config_path>gdpr/export/order_attributes</config_path>
223220
</field>
@@ -227,7 +224,7 @@
227224
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
228225
<can_be_empty>1</can_be_empty>
229226
<depends>
230-
<field id="gdpr/export/enabled">1</field>
227+
<field id="opengento_gdpr_export/export/enabled">1</field>
231228
</depends>
232229
<config_path>gdpr/export/order_custom_attributes</config_path>
233230
</field>
@@ -237,7 +234,7 @@
237234
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
238235
<can_be_empty>1</can_be_empty>
239236
<depends>
240-
<field id="gdpr/export/enabled">1</field>
237+
<field id="opengento_gdpr_export/export/enabled">1</field>
241238
</depends>
242239
<config_path>gdpr/export/order_extensible_data</config_path>
243240
</field>
@@ -250,7 +247,7 @@
250247
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
251248
<can_be_empty>1</can_be_empty>
252249
<depends>
253-
<field id="gdpr/export/enabled">1</field>
250+
<field id="opengento_gdpr_export/export/enabled">1</field>
254251
</depends>
255252
<config_path>gdpr/export/order_address_attributes</config_path>
256253
</field>
@@ -260,7 +257,7 @@
260257
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
261258
<can_be_empty>1</can_be_empty>
262259
<depends>
263-
<field id="gdpr/export/enabled">1</field>
260+
<field id="opengento_gdpr_export/export/enabled">1</field>
264261
</depends>
265262
<config_path>gdpr/export/order_address_custom_attributes</config_path>
266263
</field>
@@ -270,7 +267,7 @@
270267
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
271268
<can_be_empty>1</can_be_empty>
272269
<depends>
273-
<field id="gdpr/export/enabled">1</field>
270+
<field id="opengento_gdpr_export/export/enabled">1</field>
274271
</depends>
275272
<config_path>gdpr/export/order_address_extensible_data</config_path>
276273
</field>
@@ -283,7 +280,7 @@
283280
<backend_model>Opengento\Gdpr\Model\Config\Backend\Export</backend_model>
284281
<can_be_empty>1</can_be_empty>
285282
<depends>
286-
<field id="gdpr/export/enabled">1</field>
283+
<field id="opengento_gdpr_export/export/enabled">1</field>
287284
</depends>
288285
<config_path>gdpr/export/subscriber_attributes</config_path>
289286
</field>

etc/adminhtml/system/general.xml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,12 @@
2323
<label>Information page</label>
2424
<comment>This page should store information about privacy and GDPR policy.</comment>
2525
<source_model>Magento\Cms\Model\Config\Source\Page</source_model>
26-
<depends>
27-
<field id="gdpr/general/enabled">1</field>
28-
</depends>
29-
<config_path>gdpr/general/page_id</config_path>
26+
<config_path>opengento_gdpr_general/general/page_id</config_path>
3027
</field>
3128
<field id="information" type="select" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="30">
3229
<label>Information</label>
3330
<source_model>Magento\Cms\Model\Config\Source\Block</source_model>
34-
<depends>
35-
<field id="gdpr/general/enabled">1</field>
36-
</depends>
37-
<config_path>gdpr/general/block_id</config_path>
31+
<config_path>opengento_gdpr_general/general/block_id</config_path>
3832
</field>
3933
</group>
4034
</section>

0 commit comments

Comments
 (0)