File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
app/code/Magento/Shipping/view/adminhtml
templates/order/packaging Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 30
30
</div>
31
31
</div>
32
32
<div class="admin__control-table-wrapper admin__page-subsection">
33
- <table class="data-table admin__control-table">
33
+ <table class="data-table admin__control-table admin__control-table ">
34
34
<thead>
35
35
<tr>
36
36
<th class="col-type"><?= $ block ->escapeHtml (__ ('Type ' )) ?> </th>
46
46
<?= /* @noEscape */ $ secureRenderer ->renderStyleAsTag ('display: none ' , 'th.col-custom ' ) ?>
47
47
<?php endif ?>
48
48
<th class="col-total-weight"><?= $ block ->escapeHtml (__ ('Total Weight ' )) ?> </th>
49
- <th class="col-length"><?= $ block ->escapeHtml (__ ('Length ' )) ?> </th>
50
- <th class="col-width"><?= $ block ->escapeHtml (__ ('Width ' )) ?> </th>
51
- <th class="col-height"><?= $ block ->escapeHtml (__ ('Height ' )) ?> </th>
49
+ <th class="col-length _required "><span> < ?= $ block ->escapeHtml (__ ('Length ' )) ?> </span ></th>
50
+ <th class="col-width _required "><span> < ?= $ block ->escapeHtml (__ ('Width ' )) ?> </span ></th>
51
+ <th class="col-height _required "><span> < ?= $ block ->escapeHtml (__ ('Height ' )) ?> </span ></th>
52
52
<th> </th>
53
53
<?php if ($ block ->getDeliveryConfirmationTypes ()): ?>
54
54
<th class="col-signature"><?= $ block ->escapeHtml (__ ('Signature Confirmation ' )) ?> </th>
Original file line number Diff line number Diff line change @@ -71,6 +71,15 @@ define(['prototype'], function () {
71
71
if ( this . packagesContent . childElements ( ) . length == 0 ) {
72
72
this . newPackage ( ) ;
73
73
}
74
+ const allowedPackageTypes = [ "N" , "D" ] ;
75
+
76
+ if ( ! Object . values ( this . customizableContainers ) . some ( packageType => allowedPackageTypes . includes ( packageType ) ) ) {
77
+ $ ( 'packaging_window' ) . select (
78
+ 'th.col-length,th.col-width,th.col-height'
79
+ ) . forEach ( element => {
80
+ element . classList . remove ( '_required' )
81
+ } ) ;
82
+ }
74
83
jQuery ( this . window ) . modal ( 'openModal' ) ;
75
84
} ,
76
85
@@ -270,7 +279,7 @@ define(['prototype'], function () {
270
279
} ) ;
271
280
}
272
281
273
- return result = $$ ( '[id^="package_block_"] input' ) . collect ( function ( element ) {
282
+ return result = $$ ( '[id^="package_block_"] input' ) . collect ( function ( element ) {
274
283
return this . validateElement ( element ) ;
275
284
} , this ) . all ( ) ;
276
285
} ,
You can’t perform that action at this time.
0 commit comments