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 3030 </div>
3131 </div>
3232 <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 ">
3434 <thead>
3535 <tr>
3636 <th class="col-type"><?= $ block ->escapeHtml (__ ('Type ' )) ?> </th>
4646 <?= /* @noEscape */ $ secureRenderer ->renderStyleAsTag ('display: none ' , 'th.col-custom ' ) ?>
4747 <?php endif ?>
4848 <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>
5252 <th> </th>
5353 <?php if ($ block ->getDeliveryConfirmationTypes ()): ?>
5454 <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 () {
7171 if ( this . packagesContent . childElements ( ) . length == 0 ) {
7272 this . newPackage ( ) ;
7373 }
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+ }
7483 jQuery ( this . window ) . modal ( 'openModal' ) ;
7584 } ,
7685
@@ -270,7 +279,7 @@ define(['prototype'], function () {
270279 } ) ;
271280 }
272281
273- return result = $$ ( '[id^="package_block_"] input' ) . collect ( function ( element ) {
282+ return result = $$ ( '[id^="package_block_"] input' ) . collect ( function ( element ) {
274283 return this . validateElement ( element ) ;
275284 } , this ) . all ( ) ;
276285 } ,
You can’t perform that action at this time.
0 commit comments