Created
February 8, 2017 16:42
-
-
Save bondarewicz/4928e366cd4bc5b337264bca14e22d46 to your computer and use it in GitHub Desktop.
change delivery material-ui
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://share.plainly.co/2A371j3Z1w1J | |
const style = { | |
'margin-right' : 10 | |
} | |
const listItemStyle = { | |
border: '1px solid #ddd' | |
} | |
<div className="pvr-simple-block" id={constants.USER_TRIGGER_CHANGE_DELIVERY_ADDRESS_ID}> | |
<div className="block-title"> | |
<div className="block-title-icon"> | |
<span className="fa fa-home icon"></span> | |
</div> | |
<div className="block-title-text"> | |
<h2>Change the delivery address</h2> | |
<p>Please enter the postcode of the new delivery address</p> | |
</div> | |
</div> | |
<div className="block-contents"> | |
<RaisedButton label="Postcode Lookup" primary={true} onClick={onAddressLookupClick} style={style} /> | |
<RaisedButton label="Enter Address Manually" primary={true} onClick={onAddressEntryClick} style={style} /> | |
{addressLookup ? | |
<div className="row"> | |
<div className="col-lg-6 col-md-10"> | |
<TextField | |
name="DeliveryPostalCode" | |
hintText="Delivery Postal Code" | |
floatingLabelText="DeliveryPostalCode" | |
onChange={onChange} | |
defaultValue={PostCode} | |
fullWidth={true} | |
/> | |
<RaisedButton label="Search" primary={true} onClick={onSearch} /> | |
<List> | |
{addressList.map(address => | |
<ListItem | |
style={listItemStyle} | |
primaryText={address.text} | |
onClick={addressClicked.bind(null, address.id)} | |
key={address.id} /> | |
)} | |
</List> | |
</div> | |
</div> | |
: null} | |
{addressEntry ? | |
<div className="row"> | |
<div className="col-lg-6 col-md-10"> | |
<TextField | |
name="Name" | |
hintText="Delivery Address Name" | |
floatingLabelText="Delivery Address Name" | |
onChange={onChange} | |
defaultValue={selectedAddress.Name} | |
fullWidth={true} /> | |
<TextField | |
hintText="Delivery Address Line 1" | |
floatingLabelText="Delivery Address Line 1" | |
name="DeliveryAddressLine" | |
type="text" | |
onChange={onChange} | |
defaultValue={selectedAddress.DeliveryAddressLine} | |
fullWidth={true} /> | |
<TextField | |
hintText="Delivery Address Line 2" | |
floatingLabelText="Delivery Address Line 2" | |
name="DeliveryAddressLine2" | |
type="text" | |
onChange={onChange} | |
defaultValue={selectedAddress.DeliveryAddressLine2} | |
fullWidth={true} /> | |
<TextField | |
hintText="Delivery City Name" | |
floatingLabelText="Delivery City Name" | |
name="DeliveryCityName" | |
type="text" | |
onChange={onChange} | |
defaultValue={selectedAddress.DeliveryCityName} | |
fullWidth={true} /> | |
<TextField | |
hintText="Delivery State Code" | |
floatingLabelText="Delivery State Code" | |
name="DeliveryStateCode" | |
type="text" | |
onChange={onChange} | |
defaultValue={selectedAddress.DeliveryStateCode} | |
fullWidth={true} /> | |
<TextField | |
hintText="Delivery Country Alpha Code" | |
floatingLabelText="Delivery Country Alpha Code" | |
name="DeliveryCountryAlphaCode" | |
type="text" | |
onChange={onChange} | |
defaultValue={selectedAddress.DeliveryCountryAlphaCode} | |
fullWidth={true} /> | |
<TextField | |
hintText="Delivery Postal Code" | |
floatingLabelText="Delivery Postal Code" | |
name="DeliveryPostalCode" | |
type="text" | |
onChange={onChange} | |
defaultValue={selectedAddress.DeliveryPostalCode} | |
fullWidth={true} /> | |
<TextField | |
hintText="Receiver Email Address" | |
floatingLabelText="Receiver Email Address" | |
name="ReceiverEmailAddress" | |
type="text" | |
onChange={onChange} | |
defaultValue={selectedAddress.ReceiverEmailAddress} | |
fullWidth={true} /> | |
<TextField | |
hintText="Receiver Phone Number" | |
floatingLabelText="Receiver Phone Number" | |
name="ReceiverPhoneNumber" | |
type="text" | |
onChange={onChange} | |
defaultValue={selectedAddress.ReceiverPhoneNumber} | |
fullWidth={true} /> | |
<RaisedButton label="Change delivery address" primary={true} onClick={updateDeliveryAddress.bind(null, selectedAddress)} /> | |
</div> | |
</div> | |
: null} | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment