Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -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 = `<a href="${link}" style='color: ${color}' target='_blank'>Request Account</a>`;
if (centered) {
textLink = `<center>${textLink}</center>`
}
return textLink;
},

getMailToLabel: function(email, subject) {
const mailto = new qx.ui.basic.Label(this.mailToLink(email, subject, false)).set({
font: "text-14",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 += "</br>";
msg += osparc.store.Support.requestAccountLink();
return msg;
}
msg += qx.locale.Manager.tr(", please send us an e-mail to create an account:");
msg += "</br>";
const supportEmail = osparc.store.VendorInfo.getInstance().getSupportEmail();
const mailto = osparc.store.Support.mailToLink(supportEmail, "Request Account " + productName);
msg += mailto;
return msg;
},
Expand Down
Loading