diff --git a/Block/CheckoutLayoutProcessor.php b/Block/CheckoutLayoutProcessor.php index 11c3167..78913ce 100644 --- a/Block/CheckoutLayoutProcessor.php +++ b/Block/CheckoutLayoutProcessor.php @@ -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])); } } } diff --git a/view/frontend/web/css/source/_module.less b/view/frontend/web/css/source/_module.less new file mode 100644 index 0000000..79a832a --- /dev/null +++ b/view/frontend/web/css/source/_module.less @@ -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; + } + } + } +}