Skip to content

Commit 990292e

Browse files
authored
🎨 [Frontend] TIP.itis.swiss: Show Phase out message at Request Account (#6552)
1 parent 380f606 commit 990292e

File tree

1 file changed

+18
-3
lines changed
  • services/static-webserver/client/source/class/osparc/auth/ui

1 file changed

+18
-3
lines changed

services/static-webserver/client/source/class/osparc/auth/ui/LoginView.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ qx.Class.define("osparc.auth.ui.LoginView", {
9393
createAccountBtn.setLabel(this.tr("Request Account"));
9494
}
9595
createAccountBtn.addListener("execute", () => {
96-
createAccountBtn.setEnabled(false);
97-
if (createAccountAction === "REGISTER") {
96+
if (window.location.hostname === "tip.itis.swiss") {
97+
this.__openTIPITISSWISSPhaseOutDialog();
98+
} else if (createAccountAction === "REGISTER") {
9899
this.fireEvent("toRegister");
99100
} else if (createAccountAction === "REQUEST_ACCOUNT_FORM") {
100101
this.fireEvent("toRequestAccount");
101102
} else if (createAccountAction === "REQUEST_ACCOUNT_INSTRUCTIONS") {
102103
osparc.store.Support.openInvitationRequiredDialog();
103104
}
104-
createAccountBtn.setEnabled(true);
105105
}, this);
106106
osparc.utils.Utils.setIdToWidget(createAccountBtn, "loginCreateAccountBtn");
107107

@@ -162,6 +162,21 @@ qx.Class.define("osparc.auth.ui.LoginView", {
162162
}
163163
},
164164

165+
__openTIPITISSWISSPhaseOutDialog: function() {
166+
const createAccountWindow = new osparc.ui.window.Dialog("Request Account").set({
167+
maxWidth: 380
168+
});
169+
let message = "This version of the planning tool will be phased out soon and no longer accepts new users.";
170+
message += "<br>";
171+
const tipLiteLabel = osparc.utils.Utils.createHTMLLink("TIP.lite", "https://tip-lite.science/");
172+
const tipLabel = osparc.utils.Utils.createHTMLLink("TIP", "https://tip.science/");
173+
const hereLabel = osparc.utils.Utils.createHTMLLink("here", "https://itis.swiss/tools-and-systems/ti-planning/overview/");
174+
message += `Please visit ${tipLiteLabel} or ${tipLabel} instead. See ${hereLabel} for more information.`;
175+
createAccountWindow.setMessage(message);
176+
createAccountWindow.center();
177+
createAccountWindow.open();
178+
},
179+
165180
getEmail: function() {
166181
const email = this._form.getItems().email;
167182
return email.getValue();

0 commit comments

Comments
 (0)