Skip to content

Commit 9fc3247

Browse files
author
Serhiy Zhovnir
committed
#22786 Add dependency for UPS required fields to avoid validation for these fields if UPS is not active
1 parent c56341c commit 9fc3247

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/code/Magento/Ups/etc/adminhtml/system.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
<field id="access_license_number" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
1414
<label>Access License Number</label>
1515
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
16+
<depends>
17+
<field id="carriers/ups/active">1</field>
18+
</depends>
1619
</field>
1720
<field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
1821
<label>Enabled for Checkout</label>
@@ -84,6 +87,9 @@
8487
<field id="password" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
8588
<label>Password</label>
8689
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
90+
<depends>
91+
<field id="carriers/ups/active">1</field>
92+
</depends>
8793
</field>
8894
<field id="pickup" translate="label" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
8995
<label>Pickup Method</label>
@@ -113,6 +119,9 @@
113119
<field id="username" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
114120
<label>User ID</label>
115121
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
122+
<depends>
123+
<field id="carriers/ups/active">1</field>
124+
</depends>
116125
</field>
117126
<field id="negotiated_active" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
118127
<label>Enable Negotiated Rates</label>

0 commit comments

Comments
 (0)