Skip to content

Commit 207d657

Browse files
committed
#AC-9257::save button not working on few configuration tabs-js fixes
1 parent f1fbacb commit 207d657

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

app/code/Magento/Ups/etc/config.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<default>
1010
<carriers>
1111
<ups>
12-
<access_license_number backend_model="Magento\Config\Model\Config\Backend\Encrypted" />
1312
<active>0</active>
1413
<sallowspecific>0</sallowspecific>
1514
<allowed_methods>1DM,1DML,1DA,1DAL,1DAPI,1DP,1DPL,2DM,2DML,2DA,2DAL,3DS,GND,GNDCOM,GNDRES,STD,XPR,WXS,XPRL,XDM,XDML,XPD,01,02,03,07,08,11,12,14,54,59,65</allowed_methods>

app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ require(["prototype"], function(){
7575
initialize: function()
7676
{
7777
this.carriersUpsActiveId = 'carriers_ups_active';
78+
if (!$(this.carriersUpsActiveId)) {
79+
return;
80+
}
7881
7982
this.checkingUpsXmlId = ['carriers_ups_gateway_url','carriers_ups_username',
8083
'carriers_ups_password'];
@@ -91,6 +94,7 @@ require(["prototype"], function(){
9194
script;
9295
$scriptString .= 'this.storedOriginShipment = \'' . /* @noEscape */ $storedOriginShipment . '\';
9396
this.storedFreeShipment = \'' . /* @noEscape */ $storedFreeShipment . '\';';
97+
9498
?>
9599
<?php $scriptString .= 'this.storedAllowedMethods = '
96100
. /* @noEscape */ $jsonHelper->jsonEncode($storedAllowedMethods) . ';
@@ -151,18 +155,16 @@ $scriptString .= <<<script
151155
setFormValues: function()
152156
{
153157
var a;
154-
155-
for (a = 0; a < this.checkingUpsXmlId.length; a++) {
156-
$(this.checkingUpsXmlId[a]).addClassName('required-entry');
157-
this.changeFieldsDisabledState(this.checkingUpsXmlId, a);
158-
}
159-
160-
Event.observe($('carriers_ups_origin_shipment'), 'change', this.changeOriginShipment.bind(this));
161-
showRowArrayElements(this.onlyUpsXmlElements);
162-
if (\$F(this.carriersUpsActiveId) !== '1'){
163-
hideRowArrayElements(this.authUpsXmlElements);
164-
}
165-
this.changeOriginShipment(null, null);
158+
for (a = 0; a < this.checkingUpsXmlId.length; a++) {
159+
$(this.checkingUpsXmlId[a]).addClassName('required-entry');
160+
this.changeFieldsDisabledState(this.checkingUpsXmlId, a);
161+
}
162+
Event.observe($('carriers_ups_origin_shipment'), 'change', this.changeOriginShipment.bind(this));
163+
showRowArrayElements(this.onlyUpsXmlElements);
164+
this.changeOriginShipment(null, null);
165+
if (\$F(this.carriersUpsActiveId) !== '1'){
166+
hideRowArrayElements(this.onlyUpsXmlElements);
167+
}
166168
167169
},
168170
changeOriginShipment: function(Event, key)

0 commit comments

Comments
 (0)