Skip to content

Commit

Permalink
fix display of labels (2.4 compatibility)
Browse files Browse the repository at this point in the history
  • Loading branch information
rommelfreddy committed Oct 8, 2021
1 parent 5e7c3b3 commit 1bcec73
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
10 changes: 1 addition & 9 deletions Block/CheckoutLayoutProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,7 @@ public function process($jsLayout)
for ($i = 0; $i < $childrenCount; $i++) {
$key = 'line_' . ($i + 1);
if (isset($config[$key]) && !empty($config[$key])) {
if ($i === 0) {
// main field
$path = $streetPath . '/label';
} else {
// additional fields
$path = $streetPath . '/children/' . $i . '/label';
}

$jsLayout = $this->arrayManager->set($path, $jsLayout, __($config[$key]));
$jsLayout = $this->arrayManager->set($streetPath . '/children/' . $i . '/label', $jsLayout, __($config[$key]));
}
}
}
Expand Down
19 changes: 19 additions & 0 deletions view/frontend/web/css/source/_module.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
& when (@media-common = true) {
.field.street {
legend.label {
display: none;
}

.field {
._lib-form-field-required();

.label {
display: block;
width: 100%;
height: auto;
position: static;
margin: @form-field-type-label-block__margin;
}
}
}
}

0 comments on commit 1bcec73

Please sign in to comment.