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

Rename sending address to "address of sender"

parent 7a2f95a8
Pipeline #31883 passed with stage
in 3 minutes and 15 seconds
......@@ -196,7 +196,7 @@ function ParcelDetails(props) {
<Col sm={12} md={6}>
<AddressPanel
address={shippingAddress}
header={<b>Sending Address:</b>}
header={<b>Address of Sender:</b>}
/>
</Col>
)}
......
......@@ -205,8 +205,7 @@ function ParcelFormModal(props) {
<FormGroup controlId="shippingAddress">
<Col {...FORM_LAYOUT.labelCol}>
<ControlLabel>Sending address</ControlLabel>
<p className={styles.info}>From where the parcel is sent.</p>
<ControlLabel>Address of sender</ControlLabel>
<p>
<DropdownButton title="Choose" id="shippingAddressAutoFill">
{addresses.map((a) => (
......
......@@ -5,7 +5,7 @@ import AddressResource from '../../resources/address';
import AddressFormModal from '../Address/AddressFormModal';
function CreateAddress(props) {
const { investigation, type, onCreate } = props;
const { investigation, onCreate } = props;
const [isCreating, setCreating] = useState(false);
......@@ -39,7 +39,7 @@ function CreateAddress(props) {
setCreating(true);
}}
>
Create new {type} address
Create new address
</Button>
</>
);
......
......@@ -228,8 +228,9 @@ function ParcelsSection(props) {
) : (
<div className={styles.heading}>
<HelpBlock>
<Glyphicon glyph="warning-sign" /> Your shipping addresses are
not valid ! Please correct them before adding parcels.
<Glyphicon glyph="warning-sign" /> Your default shipping
addresses are not valid ! Please correct them before adding
parcels.
</HelpBlock>
<Button className={styles.newButton} bsStyle="primary" disabled>
<Glyphicon glyph="plus" /> New parcel
......
......@@ -10,11 +10,13 @@ function ShipmentSummary(props) {
<Col md={4}>
{defaultShippingAddress !== undefined ? (
<AddressPanel
header={<b>Default sending address</b>}
header={<b>Default sender's address</b>}
address={defaultShippingAddress}
/>
) : (
<Alert bsStyle="danger">Sending address no longer exists.</Alert>
<Alert bsStyle="danger">
Default sender's address no longer exists.
</Alert>
)}
</Col>
<Col md={4}>
......@@ -24,7 +26,9 @@ function ShipmentSummary(props) {
address={defaultReturnAddress}
/>
) : (
<Alert bsStyle="danger">Return address no longer exists.</Alert>
<Alert bsStyle="danger">
Default return address no longer exists.
</Alert>
)}
</Col>
<Col md={4}>
......
......@@ -105,13 +105,9 @@ function ShippingForm(props) {
<FormGroup controlId="defaultShippingAddress">
<Col {...FORM_LAYOUT.labelCol}>
<ControlLabel>
Default sending address{' '}
Default sender's address{' '}
<span className={styles.hint}>– required</span>
</ControlLabel>
<p className={styles.info}>
The <em>sending address</em> is the address from where a parcel is
sent.
</p>
</Col>
<Col {...FORM_LAYOUT.fieldCol}>
<FormControl
......@@ -119,7 +115,7 @@ function ShippingForm(props) {
componentClass="select"
inputRef={register({ required: true })}
>
<option value="">Select default sending address...</option>
<option value="">Select default sender's address...</option>
{shippingAddressOptions.map((addr) => (
<option key={addr._id} value={addr._id}>
{addressFormatter(addr)}
......@@ -137,7 +133,7 @@ function ShippingForm(props) {
)}
{errors.defaultShippingAddress && (
<FieldAlert
fieldLabel="Default sending address"
fieldLabel="Default sender's address"
error={errors.defaultShippingAddress}
/>
)}
......@@ -145,7 +141,6 @@ function ShippingForm(props) {
{shippingAddressOptions.length === 0 && 'No addresses found! '}
<CreateAddress
investigation={investigation}
type="shipping"
onCreate={(id) => {
setValue('defaultShippingAddress', id);
}}
......@@ -198,7 +193,6 @@ function ShippingForm(props) {
{returnAddressOptions.length === 0 && 'No addresses found! '}
<CreateAddress
investigation={investigation}
type="return"
onCreate={(id) => {
setValue('defaultReturnAddress', id);
}}
......
Markdown is supported
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