Commit f466f4a5 authored by Axel Bocciarelli's avatar Axel Bocciarelli
Browse files

Fix DOM nesting and improve labels of address pickers

parent 03bfa137
...@@ -206,8 +206,11 @@ function ParcelFormModal(props) { ...@@ -206,8 +206,11 @@ 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"
id="shippingAddressAutoFill"
className={styles.dropdown}
>
{addresses.map((a) => ( {addresses.map((a) => (
<MenuItem <MenuItem
key={a._id} key={a._id}
...@@ -220,7 +223,6 @@ function ParcelFormModal(props) { ...@@ -220,7 +223,6 @@ function ParcelFormModal(props) {
</MenuItem> </MenuItem>
))} ))}
</DropdownButton> </DropdownButton>
</p>
</Col> </Col>
<Col {...FORM_LAYOUT.fieldCol}> <Col {...FORM_LAYOUT.fieldCol}>
<AddressTextFieldsForm addressObjName={'shippingAddress'} /> <AddressTextFieldsForm addressObjName={'shippingAddress'} />
...@@ -239,8 +241,11 @@ function ParcelFormModal(props) { ...@@ -239,8 +241,11 @@ 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"
id="returnAddressAutoFill"
className={styles.dropdown}
>
{addresses.map((a) => ( {addresses.map((a) => (
<MenuItem <MenuItem
key={a._id} key={a._id}
...@@ -257,7 +262,6 @@ function ParcelFormModal(props) { ...@@ -257,7 +262,6 @@ function ParcelFormModal(props) {
</MenuItem> </MenuItem>
))} ))}
</DropdownButton> </DropdownButton>
</p>
</Col> </Col>
<Col {...FORM_LAYOUT.fieldCol}> <Col {...FORM_LAYOUT.fieldCol}>
<Checkbox <Checkbox
......
.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;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment