Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/config_sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@
$facility_courier_countries = array('United Kingdom');
// List of non dom eu free countries
$facility_courier_countries_nde = array('France', 'Italy', 'Spain');
// Link to help with international shipments
$facility_courier_countries_link = '';
$package_description = 'Dry shipper containing frozen crystals';
$dewar_weight = 18;

Expand Down
3 changes: 2 additions & 1 deletion api/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function setupApplication($mode): Slim

$app->get('/options', function () use ($app) {
global $motd, $authentication_type, $cas_url, $cas_sso, $sso_url, $package_description,
$facility_courier_countries, $facility_courier_countries_nde,
$facility_courier_countries, $facility_courier_countries_nde, $facility_courier_countries_link,
$dhl_enable, $scale_grid, $scale_grid_end_date, $preset_proposal, $timezone,
$valid_components, $enabled_container_types, $ifsummary, $synchweb_version, $redirects,
$shipping_service_app_url, $use_shipping_service_redirect, $use_shipping_service_redirect_incoming_shipments;
Expand All @@ -83,6 +83,7 @@ function setupApplication($mode): Slim
'package_description' => $package_description,
'facility_courier_countries' => $facility_courier_countries,
'facility_courier_countries_nde' => $facility_courier_countries_nde,
'facility_courier_countries_link' => $facility_courier_countries_link,
'dhl_enable' => $dhl_enable,
'scale_grid' => $scale_grid,
'scale_grid_end_date' => $scale_grid_end_date,
Expand Down
3 changes: 3 additions & 0 deletions client/src/js/modules/shipment/views/shipment.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ define(['marionette',
APIURL: app.apiurl,
PROP: app.prop,
DHL_ENABLE: app.options.get('dhl_enable'),
FACILITY_COURIER_COUNTRIES: app.options.get('facility_courier_countries'),
FACILITY_COURIER_COUNTRIES_NDE: app.options.get('facility_courier_countries_nde'),
FACILITY_COURIER_COUNTRIES_LINK: app.options.get('facility_courier_countries_link'),
}
},

Expand Down
6 changes: 4 additions & 2 deletions client/src/js/templates/shipment/shipment.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ <h1 data-testid="shipment-header">Shipment: <span class="SHIPPINGNAME"><%-SHIPPI
<% if (DHL_ENABLE) { %>
<% if (DELIVERYAGENT_HAS_LABEL == '1') { %>
<p class="message notify">You can print your Air Waybill by clicking &quot;Print Air Waybill&quot; below</p>
<% } else if (COUNTRY && COUNTRY !="United Kingdom" ) { %>
<p class="message alert">International shipping is currently disabled from this application. Please see <a href="https://www.diamond.ac.uk/Instruments/Mx/I03/I03-Manual/Shipping-Samples.html">here</a></p>
<% } else if (COUNTRY && FACILITY_COURIER_COUNTRIES_NDE.includes(COUNTRY) ) { %>
<p class="message alert">International shipping is not available through this application. If you're arranging your own shipping (e.g. industrial users), enter your tracking numbers below after booking and include printed return labels in the dewar case. European academic users, please see <a href="<%-FACILITY_COURIER_COUNTRIES_LINK%>">here</a>.</p>
<% } else if (COUNTRY && !FACILITY_COURIER_COUNTRIES.includes(COUNTRY) ) { %>
<p class="message alert">International shipping is not available through this application. If you're arranging your own shipping, enter your tracking numbers below after booking and include printed return labels in the dewar case.</p>
<% } else { %>
<p class="message notify">You can now book your shipment with DHL using &quot;Create Air Waybill&quot; below</p>
<% } %>
Expand Down
4 changes: 3 additions & 1 deletion client/src/js/templates/shipment/shipmentadd.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

<h1>Add New Shipment</h1>

<p class="message alert">Please note that international shipping is currently disabled from this application. Please see the link <a href="https://www.diamond.ac.uk/Instruments/Mx/I03/I03-Manual/Shipping-Samples.html">here</a></p>
<% if (FACILITY_COURIER_COUNTRIES_LINK) { %>
<p class="message alert">Please note that international shipping is currently disabled from this application. Please see the link <a href="<%-FACILITY_COURIER_COUNTRIES_LINK%>">here</a>.</p>
<% } %>

<form method="post" id="add_shipment">

Expand Down