add requested fields to delivery address form
This commit is contained in:
@@ -12,7 +12,10 @@ class AddEditProfileAddress extends Component {
|
||||
idCountrySelected: address.idCountrySelected || this.props.params.countries[0].idCountry,
|
||||
city: address.city || '',
|
||||
detailedAddress: address.detailedAddress || '',
|
||||
zipCode: address.zipCode || ''
|
||||
zipCode: address.zipCode || '',
|
||||
firstName: address.firstName || '',
|
||||
lastName: address.lastName || '',
|
||||
deliveryMail: address.deliveryMail || ''
|
||||
};
|
||||
this.props.params.onAddressChange(this.state);
|
||||
|
||||
@@ -30,12 +33,47 @@ class AddEditProfileAddress extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const {idCountrySelected, city, detailedAddress, zipCode} = this.state;
|
||||
const {idCountrySelected, city, detailedAddress, zipCode, firstName, lastName, deliveryMail} = this.state;
|
||||
const {countries} = this.props.params;
|
||||
|
||||
return (
|
||||
<div className="address-add-edit-content">
|
||||
<Form className="address-edit-content">
|
||||
<h5>{profileTexts.labels.DELEGATE}</h5>
|
||||
<FormGroup>
|
||||
<Label for="address-first-name">{profileTexts.labels.FIRST_NAME}</Label>
|
||||
<Input value={firstName}
|
||||
autoComplete="nope"
|
||||
onChange={this.handleChange}
|
||||
type="text"
|
||||
name="firstName"
|
||||
id="address-first-name"
|
||||
placeholder={profileTexts.labels.FIRST_NAME} />
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<Label for="address-last-name">{profileTexts.labels.LAST_NAME}</Label>
|
||||
<Input value={lastName}
|
||||
autoComplete="nope"
|
||||
onChange={this.handleChange}
|
||||
type="text"
|
||||
name="lastName"
|
||||
id="address-last-name"
|
||||
placeholder={profileTexts.labels.LAST_NAME} />
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<Label for="address-delivery-mail">{profileTexts.labels.DELIVERY_MAIL}</Label>
|
||||
<Input value={deliveryMail}
|
||||
autoComplete="nope"
|
||||
onChange={this.handleChange}
|
||||
type="text"
|
||||
name="deliveryMail"
|
||||
id="address-delivery-mail"
|
||||
placeholder={profileTexts.labels.DELIVERY_MAIL} />
|
||||
</FormGroup>
|
||||
|
||||
<h5>{profileTexts.labels.BILLING_ADDRESSES}</h5>
|
||||
<FormGroup>
|
||||
<Label for="address-country">{profileTexts.labels.ADDRESS_COUNTRY}<span className="required-icon">*</span></Label>
|
||||
<Input value={idCountrySelected}
|
||||
|
||||
Reference in New Issue
Block a user