diff --git a/services/static-webserver/client/source/class/osparc/store/Support.js b/services/static-webserver/client/source/class/osparc/store/Support.js index 281127d06ffb..028030c826dc 100644 --- a/services/static-webserver/client/source/class/osparc/store/Support.js +++ b/services/static-webserver/client/source/class/osparc/store/Support.js @@ -149,6 +149,16 @@ qx.Class.define("osparc.store.Support", { return textLink; }, + requestAccountLink: function(centered = true) { + const color = qx.theme.manager.Color.getInstance().resolve("text"); + const link = window.location.origin + "/#/request-account"; + let textLink = `Request Account`; + if (centered) { + textLink = `
${textLink}
` + } + return textLink; + }, + getMailToLabel: function(email, subject) { const mailto = new qx.ui.basic.Label(this.mailToLink(email, subject, false)).set({ font: "text-14", diff --git a/services/static-webserver/client/source/class/osparc/utils/Utils.js b/services/static-webserver/client/source/class/osparc/utils/Utils.js index e2b4bce2a3c6..9968467efff2 100644 --- a/services/static-webserver/client/source/class/osparc/utils/Utils.js +++ b/services/static-webserver/client/source/class/osparc/utils/Utils.js @@ -644,13 +644,22 @@ qx.Class.define("osparc.utils.Utils", { const productName = osparc.store.StaticInfo.getInstance().getDisplayName(); const manuals = osparc.store.Support.getManuals(); const manualLink = (manuals && manuals.length) ? manuals[0].url : ""; - const supportEmail = osparc.store.VendorInfo.getInstance().getSupportEmail(); - const mailto = osparc.store.Support.mailToLink(supportEmail, "Request Account " + productName); let msg = ""; msg += qx.locale.Manager.tr("To use all "); msg += this.createHTMLLink(productName + " features", manualLink); + + if (osparc.product.Utils.getCreateAccountAction() === "REQUEST_ACCOUNT_FORM") { + // if the product is configured to show a form to request an account, + // then show a link to it in the message + msg += qx.locale.Manager.tr(", please request an account in the following link:"); + msg += "
"; + msg += osparc.store.Support.requestAccountLink(); + return msg; + } msg += qx.locale.Manager.tr(", please send us an e-mail to create an account:"); msg += "
"; + const supportEmail = osparc.store.VendorInfo.getInstance().getSupportEmail(); + const mailto = osparc.store.Support.mailToLink(supportEmail, "Request Account " + productName); msg += mailto; return msg; },