From 7ccbdc41cb15e959a5e9dc50834eba54f9150bad Mon Sep 17 00:00:00 2001 From: constantology Date: Thu, 21 Sep 2017 16:35:56 +0100 Subject: [PATCH] add support for MSG_4050: content no longer available --- src/js/config.js | 1 + src/js/modal-download.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/js/config.js b/src/js/config.js index 0a8cf41..ec6fa2e 100644 --- a/src/js/config.js +++ b/src/js/config.js @@ -59,6 +59,7 @@ export const MESSAGES = {

This content will incur additional charges to republish. Please contact us for further details (syndication@ft.com or +44 (0)207 873 4816).

Please ensure you have considered your contractual rights before republishing.

`, MSG_4000: `${EMPTY}

This content is not available for republishing.

`, + MSG_4050: `${EMPTY}

Sorry, this content is no longer available.

`, MSG_4100: `${EMPTY}

You have reached your download limit for articles. Please contact your Account Manager to increase your limit.

`, MSG_4200: `${EMPTY}

Your contract does not allow {{type}}s to be downloaded. Please contact your Account Manager to change this.

`, MSG_5000: `${EMPTY}

Sorry, an error has occurred. Please try signing out and then in again. If error persists, please contact your Account Manager.

` diff --git a/src/js/modal-download.js b/src/js/modal-download.js index 4a8d76b..f7f2184 100644 --- a/src/js/modal-download.js +++ b/src/js/modal-download.js @@ -147,7 +147,11 @@ function createElement (item) { trackableValueDownloadItem = 'download-saved-item'; } - if (item.canBeSyndicated === 'verify') { + if (item.notAvailable === true) { + downloadButtonState = 'disabled'; + message = MESSAGES.MSG_4050; + } + else if (item.canBeSyndicated === 'verify') { downloadButtonState = 'disabled'; message = MESSAGES.MSG_2200; }