Skip to content

Commit

Permalink
magento#22786 Add dependency for UPS required fields to avoid validat…
Browse files Browse the repository at this point in the history
…ion for these fields if UPS is not active
  • Loading branch information
Serhiy Zhovnir committed May 13, 2019
1 parent eaf875e commit d4553a2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/code/Magento/Ups/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<field id="access_license_number" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Access License Number</label>
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
<depends>
<field id="carriers/ups/active">1</field>
</depends>
</field>
<field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Enabled for Checkout</label>
Expand Down Expand Up @@ -84,6 +87,9 @@
<field id="password" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Password</label>
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
<depends>
<field id="carriers/ups/active">1</field>
</depends>
</field>
<field id="pickup" translate="label" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Pickup Method</label>
Expand Down Expand Up @@ -113,6 +119,9 @@
<field id="username" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
<label>User ID</label>
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
<depends>
<field id="carriers/ups/active">1</field>
</depends>
</field>
<field id="negotiated_active" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Enable Negotiated Rates</label>
Expand Down

0 comments on commit d4553a2

Please sign in to comment.