File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,16 @@ qx.Class.define("osparc.store.Support", {
149149 return textLink ;
150150 } ,
151151
152+ requestAccountLink : function ( centered = true ) {
153+ const color = qx . theme . manager . Color . getInstance ( ) . resolve ( "text" ) ;
154+ const link = window . location . origin + "/#/request-account" ;
155+ let textLink = `<a href="${ link } " style='color: ${ color } ' target='_blank'>Request Account</a>` ;
156+ if ( centered ) {
157+ textLink = `<center>${ textLink } </center>`
158+ }
159+ return textLink ;
160+ } ,
161+
152162 getMailToLabel : function ( email , subject ) {
153163 const mailto = new qx . ui . basic . Label ( this . mailToLink ( email , subject , false ) ) . set ( {
154164 font : "text-14" ,
Original file line number Diff line number Diff line change @@ -644,13 +644,22 @@ qx.Class.define("osparc.utils.Utils", {
644644 const productName = osparc . store . StaticInfo . getInstance ( ) . getDisplayName ( ) ;
645645 const manuals = osparc . store . Support . getManuals ( ) ;
646646 const manualLink = ( manuals && manuals . length ) ? manuals [ 0 ] . url : "" ;
647- const supportEmail = osparc . store . VendorInfo . getInstance ( ) . getSupportEmail ( ) ;
648- const mailto = osparc . store . Support . mailToLink ( supportEmail , "Request Account " + productName ) ;
649647 let msg = "" ;
650648 msg += qx . locale . Manager . tr ( "To use all " ) ;
651649 msg += this . createHTMLLink ( productName + " features" , manualLink ) ;
650+
651+ if ( osparc . product . Utils . getCreateAccountAction ( ) === "REQUEST_ACCOUNT_FORM" ) {
652+ // if the product is configured to show a form to request an account,
653+ // then show a link to it in the message
654+ msg += qx . locale . Manager . tr ( ", please request an account in the following link:" ) ;
655+ msg += "</br>" ;
656+ msg += osparc . store . Support . requestAccountLink ( ) ;
657+ return msg ;
658+ }
652659 msg += qx . locale . Manager . tr ( ", please send us an e-mail to create an account:" ) ;
653660 msg += "</br>" ;
661+ const supportEmail = osparc . store . VendorInfo . getInstance ( ) . getSupportEmail ( ) ;
662+ const mailto = osparc . store . Support . mailToLink ( supportEmail , "Request Account " + productName ) ;
654663 msg += mailto ;
655664 return msg ;
656665 } ,
You can’t perform that action at this time.
0 commit comments