Move country to top of form for all countries (#47375)
* Move country to top of form for all countries * adjust styling * Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
2db29164f9
commit
76a9e2eb27
|
@ -26,8 +26,11 @@
|
|||
flex: 1 0 calc(50% - #{$gap-small}); // "flex-grow = 1" allows the input to grow to fill the space
|
||||
box-sizing: border-box;
|
||||
|
||||
&:nth-of-type(2),
|
||||
&:first-of-type {
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:first-child + .wc-block-components-text-input {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +41,10 @@
|
|||
.wc-block-components-country-input,
|
||||
.wc-block-components-checkbox {
|
||||
flex: 0 0 100%;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: update
|
||||
|
||||
Move country to be the first field in Checkout block.
|
|
@ -104,6 +104,17 @@ class CheckoutFields {
|
|||
'autocapitalize' => 'none',
|
||||
'index' => 0,
|
||||
],
|
||||
'country' => [
|
||||
'label' => __( 'Country/Region', 'woocommerce' ),
|
||||
'optionalLabel' => __(
|
||||
'Country/Region (optional)',
|
||||
'woocommerce'
|
||||
),
|
||||
'required' => true,
|
||||
'hidden' => false,
|
||||
'autocomplete' => 'country',
|
||||
'index' => 1,
|
||||
],
|
||||
'first_name' => [
|
||||
'label' => __( 'First name', 'woocommerce' ),
|
||||
'optionalLabel' => __(
|
||||
|
@ -164,17 +175,6 @@ class CheckoutFields {
|
|||
'autocapitalize' => 'sentences',
|
||||
'index' => 50,
|
||||
],
|
||||
'country' => [
|
||||
'label' => __( 'Country/Region', 'woocommerce' ),
|
||||
'optionalLabel' => __(
|
||||
'Country/Region (optional)',
|
||||
'woocommerce'
|
||||
),
|
||||
'required' => true,
|
||||
'hidden' => false,
|
||||
'autocomplete' => 'country',
|
||||
'index' => 50,
|
||||
],
|
||||
'city' => [
|
||||
'label' => __( 'City', 'woocommerce' ),
|
||||
'optionalLabel' => __(
|
||||
|
|
Loading…
Reference in New Issue