Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ICAT
Datahub
Commits
f466f4a5
Commit
f466f4a5
authored
Aug 26, 2020
by
Axel Bocciarelli
Browse files
Fix DOM nesting and improve labels of address pickers
parent
03bfa137
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/components/Parcels/ParcelFormModal.js
View file @
f466f4a5
...
@@ -206,21 +206,23 @@ function ParcelFormModal(props) {
...
@@ -206,21 +206,23 @@ function ParcelFormModal(props) {
<
FormGroup
controlId
=
"
shippingAddress
"
>
<
FormGroup
controlId
=
"
shippingAddress
"
>
<
Col
{...
FORM_LAYOUT
.
labelCol
}
>
<
Col
{...
FORM_LAYOUT
.
labelCol
}
>
<
ControlLabel
>
Address
of
sender
<
/ControlLabel
>
<
ControlLabel
>
Address
of
sender
<
/ControlLabel
>
<
p
>
<
DropdownButton
<
DropdownButton
title
=
"
Choose
"
id
=
"
shippingAddressAutoFill
"
>
title
=
"
Choose from my addresses
"
{
addresses
.
map
((
a
)
=>
(
id
=
"
shippingAddressAutoFill
"
<
MenuItem
className
=
{
styles
.
dropdown
}
key
=
{
a
.
_id
}
>
eventKey
=
{
a
.
_id
}
{
addresses
.
map
((
a
)
=>
(
onSelect
=
{()
=>
<
MenuItem
reset
({
...
getValues
(),
shippingAddress
:
a
})
key
=
{
a
.
_id
}
}
eventKey
=
{
a
.
_id
}
>
onSelect
=
{()
=>
{
addressFormatter
(
a
)}
reset
({
...
getValues
(),
shippingAddress
:
a
})
<
/MenuItem
>
}
))}
>
<
/DropdownButton
>
{
addressFormatter
(
a
)}
<
/p
>
<
/MenuItem
>
))}
<
/DropdownButton
>
<
/Col
>
<
/Col
>
<
Col
{...
FORM_LAYOUT
.
fieldCol
}
>
<
Col
{...
FORM_LAYOUT
.
fieldCol
}
>
<
AddressTextFieldsForm
addressObjName
=
{
'
shippingAddress
'
}
/
>
<
AddressTextFieldsForm
addressObjName
=
{
'
shippingAddress
'
}
/
>
...
@@ -239,25 +241,27 @@ function ParcelFormModal(props) {
...
@@ -239,25 +241,27 @@ function ParcelFormModal(props) {
<
p
className
=
{
styles
.
info
}
>
<
p
className
=
{
styles
.
info
}
>
Where
to
return
the
parcel
at
the
end
of
the
investigation
.
Where
to
return
the
parcel
at
the
end
of
the
investigation
.
<
/p
>
<
/p
>
<
p
>
<
DropdownButton
<
DropdownButton
title
=
"
Choose
"
id
=
"
returnAddressAutoFill
"
>
title
=
"
Choose from my addresses
"
{
addresses
.
map
((
a
)
=>
(
id
=
"
returnAddressAutoFill
"
<
MenuItem
className
=
{
styles
.
dropdown
}
key
=
{
a
.
_id
}
>
eventKey
=
{
a
.
_id
}
{
addresses
.
map
((
a
)
=>
(
onSelect
=
{()
=>
<
MenuItem
reset
({
key
=
{
a
.
_id
}
...
getValues
(),
eventKey
=
{
a
.
_id
}
returnAddress
:
a
,
onSelect
=
{()
=>
noReturnAddress
:
false
,
reset
({
})
...
getValues
(),
}
returnAddress
:
a
,
>
noReturnAddress
:
false
,
{
addressFormatter
(
a
)}
})
<
/MenuItem
>
}
))}
>
<
/DropdownButton
>
{
addressFormatter
(
a
)}
<
/p
>
<
/MenuItem
>
))}
<
/DropdownButton
>
<
/Col
>
<
/Col
>
<
Col
{...
FORM_LAYOUT
.
fieldCol
}
>
<
Col
{...
FORM_LAYOUT
.
fieldCol
}
>
<
Checkbox
<
Checkbox
...
...
src/components/Parcels/ParcelFormModal.module.css
View file @
f466f4a5
.info
{
.info
{
font-size
:
smaller
;
font-size
:
smaller
;
margin-bottom
:
0
;
}
}
.hint
{
.hint
{
...
@@ -10,3 +11,7 @@
...
@@ -10,3 +11,7 @@
.returnCheckbox
{
.returnCheckbox
{
margin-bottom
:
10px
!important
;
margin-bottom
:
10px
!important
;
}
}
.dropdown
{
margin-top
:
5px
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment