Commit 2c961bad authored by Loic Huder's avatar Loic Huder
Browse files

Merge branch 'change-labels' into 'master'

Change labels Shipping Address and Name for parcels

Closes #381 and #382

See merge request !404
parents 03c4b5ec 25f6b402
Pipeline #31538 passed with stages
in 5 minutes and 12 seconds
......@@ -148,7 +148,7 @@ function ParcelDetails(props) {
<Row style={{ marginTop: "0.5rem" }}>
{shippingAddress && (
<Col sm={12} md={6}>
<AddressPanel address={shippingAddress} header={<b>Shipping Address:</b>} />
<AddressPanel address={shippingAddress} header={<b>Sending Address:</b>} />
</Col>
)}
<Col sm={12} md={6}>
......
......@@ -70,7 +70,7 @@ function ParcelFormModal(props) {
{<input name="investigationName" defaultValue={investigationName} type="hidden" ref={register} />}
{<input name="shipmentId" defaultValue={shipmentId} type="hidden" ref={register} />}
<TextFieldGroup name="name" type="text" registerOptions={{ required: true }} layout={FORM_LAYOUT} />
<TextFieldGroup name="name" label="Name of the parcel" type="text" registerOptions={{ required: true }} layout={FORM_LAYOUT} />
<TextFieldGroup name="description" type="textarea" layout={FORM_LAYOUT} />
<FormGroup controlId="storageConditions">
<Col {...FORM_LAYOUT.labelCol}>
......@@ -110,7 +110,7 @@ function ParcelFormModal(props) {
<FormGroup controlId="shippingAddress">
<Col {...FORM_LAYOUT.labelCol}>
<ControlLabel>Shipping address</ControlLabel>
<ControlLabel>Sending address</ControlLabel>
<p className={styles.info}>From where the parcel is sent.</p>
<p>
<DropdownButton title="Choose" id="shippingAddressAutoFill">
......
......@@ -9,9 +9,9 @@ function ShipmentSummary(props) {
<Row>
<Col md={4}>
{defaultShippingAddress !== undefined ? (
<AddressPanel header={<b>Default shipping address</b>} address={defaultShippingAddress} />
<AddressPanel header={<b>Default sending address</b>} address={defaultShippingAddress} />
) : (
<Alert bsStyle="danger">Shipping address no longer exists.</Alert>
<Alert bsStyle="danger">Sending address no longer exists.</Alert>
)}
</Col>
<Col md={4}>
......
......@@ -56,15 +56,15 @@ function ShippingForm(props) {
<FormGroup controlId="defaultShippingAddress">
<Col {...FORM_LAYOUT.labelCol}>
<ControlLabel>
Default shipping address <span className={styles.hint}> required</span>
Default sending address <span className={styles.hint}> required</span>
</ControlLabel>
<p className={styles.info}>
The <em>shipping address</em> is the address from where a parcel is sent.
The <em>sending address</em> is the address from where a parcel is sent.
</p>
</Col>
<Col {...FORM_LAYOUT.fieldCol}>
<FormControl name="defaultShippingAddress" componentClass="select" disabled={noAddress} inputRef={register({ required: true })}>
<option value="">Select default shipping address...</option>
<option value="">Select default sending address...</option>
{addresses.map((addr) => (
<option key={addr._id} value={addr._id}>
{addressFormatter(addr)}
......@@ -77,7 +77,7 @@ function ShippingForm(props) {
<Glyphicon glyph="warning-sign" /> The new default address will not be applied to existing parcels automatically
</HelpBlock>
)}
{errors.defaultShippingAddress && <FieldAlert fieldLabel="Default shipping address" error={errors.defaultShippingAddress} />}
{errors.defaultShippingAddress && <FieldAlert fieldLabel="Default sending address" error={errors.defaultShippingAddress} />}
<HelpBlock>
{noAddress && "No addresses found! "}
<CreateAddress
......
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