diff --git a/biodatacatalyst-ui/src/main/webapp/picsureui/common/redirect-modal.js b/biodatacatalyst-ui/src/main/webapp/picsureui/common/redirect-modal.js index 83382bbc..7e197599 100644 --- a/biodatacatalyst-ui/src/main/webapp/picsureui/common/redirect-modal.js +++ b/biodatacatalyst-ui/src/main/webapp/picsureui/common/redirect-modal.js @@ -29,6 +29,8 @@ define([ return BB.View.extend({ initialize: function (opts) { this.data = opts || {}; + this.headerMessage = this.data.headerMessage ? this.data.headerMessage : "Leaving BDC-PIC-SURE"; + this.message = this.data.message && Array.isArray(this.data.message) ? this.data.message : ["This external website will be opened as a new tab in your browser.", "Are you sure you want to leave BDC-PIC-SURE?"]; }, render: function (sourceEvent, url = undefined) { let closeModal = function (e) { @@ -59,17 +61,11 @@ define([ } ]; - const modalMessage = [ - "This external website will be opened as a new tab in your browser.", - "Are you sure you want to leave BDC-PIC-SURE?" - ]; - - const modalContainerId = "modal-redirect"; const dialogView = new dialog({ options: dialogOption, - messages: modalMessage, + messages: this.message, modalContainerId: modalContainerId, }); @@ -78,7 +74,7 @@ define([ modal.displayModal( dialogView - , "Leaving BDC-PIC-SURE" + , this.headerMessage , () => { sourceEvent.target.focus(); } diff --git a/biodatacatalyst-ui/src/main/webapp/picsureui/search-interface/package-view.js b/biodatacatalyst-ui/src/main/webapp/picsureui/search-interface/package-view.js index 056f6818..6d77e599 100644 --- a/biodatacatalyst-ui/src/main/webapp/picsureui/search-interface/package-view.js +++ b/biodatacatalyst-ui/src/main/webapp/picsureui/search-interface/package-view.js @@ -301,7 +301,7 @@ define([ $('.close')?.get(0).click(); }, classes: "btn btn-primary"} ]; - const message = 'You are transferring data through the BioData Catalyst security boundary which may or may not be supported by your Data Use Agreement(s), Limitation(s), or your Institutional Review Board policies and guidelines. As a BioData Catalyst user, you are solely responsible for adhering to the terms of these policies.'; + let message = settings?.downloadConfirmationMessage ?? 'You are transferring data through the BioData Catalyst security boundary which may or may not be supported by your Data Use Agreement(s), Limitation(s), or your Institutional Review Board policies and guidelines. As a BioData Catalyst user, you are solely responsible for adhering to the terms of these policies.'; const dialogView = new dialog({options: dialogOptions, messages: [message], previousView: {view: this, title: 'Review and Package Data', model: this.model}}); modal.displayModal(dialogView, 'Are you sure you want to download data?', function(){ $('#package-download-button').focus();