diff --git a/api/config_sample.php b/api/config_sample.php index 9adce79f5..2b924d9ac 100644 --- a/api/config_sample.php +++ b/api/config_sample.php @@ -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; diff --git a/api/index.php b/api/index.php index 4f884d58d..ace25a44c 100644 --- a/api/index.php +++ b/api/index.php @@ -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; @@ -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, diff --git a/client/src/js/modules/shipment/views/shipment.js b/client/src/js/modules/shipment/views/shipment.js index 7c4bf7842..001a774a8 100644 --- a/client/src/js/modules/shipment/views/shipment.js +++ b/client/src/js/modules/shipment/views/shipment.js @@ -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'), } }, diff --git a/client/src/js/templates/shipment/shipment.html b/client/src/js/templates/shipment/shipment.html index 251aeba0f..f2876c824 100644 --- a/client/src/js/templates/shipment/shipment.html +++ b/client/src/js/templates/shipment/shipment.html @@ -6,8 +6,10 @@

Shipment: <%-SHIPPI <% if (DHL_ENABLE) { %> <% if (DELIVERYAGENT_HAS_LABEL == '1') { %>

You can print your Air Waybill by clicking "Print Air Waybill" below

- <% } else if (COUNTRY && COUNTRY !="United Kingdom" ) { %> -

International shipping is currently disabled from this application. Please see here

+ <% } else if (COUNTRY && FACILITY_COURIER_COUNTRIES_NDE.includes(COUNTRY) ) { %> +

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 here.

+ <% } else if (COUNTRY && !FACILITY_COURIER_COUNTRIES.includes(COUNTRY) ) { %> +

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.

<% } else { %>

You can now book your shipment with DHL using "Create Air Waybill" below

<% } %> diff --git a/client/src/js/templates/shipment/shipmentadd.html b/client/src/js/templates/shipment/shipmentadd.html index 0860a72c9..3866fe012 100644 --- a/client/src/js/templates/shipment/shipmentadd.html +++ b/client/src/js/templates/shipment/shipmentadd.html @@ -2,7 +2,9 @@

Add New Shipment

-

Please note that international shipping is currently disabled from this application. Please see the link here

+<% if (FACILITY_COURIER_COUNTRIES_LINK) { %> +

Please note that international shipping is currently disabled from this application. Please see the link here.

+<% } %>