diff --git a/model/src/main/java/lcsb/mapviewer/model/user/ConfigurationElementType.java b/model/src/main/java/lcsb/mapviewer/model/user/ConfigurationElementType.java index e4577f3ccb6dbb15db57b9a3ba18ef9bc246cdbb..5c8ca43e5c4be95202256a08f9a9d522c37ee606 100644 --- a/model/src/main/java/lcsb/mapviewer/model/user/ConfigurationElementType.java +++ b/model/src/main/java/lcsb/mapviewer/model/user/ConfigurationElementType.java @@ -150,7 +150,7 @@ public enum ConfigurationElementType { * Default content of the email when requesting for an account in the system. */ REQUEST_ACCOUNT_DEFAULT_CONTENT("Email content used for requesting an account", - "Dear Diseas map team,\nI would like to request for an account.\nKind regards", ConfigurationElementEditType.TEXT, + "Dear Disease map team,\nI would like to request an account in the system.\nKind regards", ConfigurationElementEditType.TEXT, false), ; diff --git a/web/src/main/webapp/login.xhtml b/web/src/main/webapp/login.xhtml index 0f59d45952dded9f3f842730297bf43419f7fa14..d2464a754bd423e87d55e7f32fcfa1324a767f89 100644 --- a/web/src/main/webapp/login.xhtml +++ b/web/src/main/webapp/login.xhtml @@ -72,6 +72,18 @@ } }); } + function requestAccount() { + var email, content; + return minerva.ServerConnector.getConfigurationParam("REQUEST_ACCOUNT_EMAIL").then(function(result){ + email = result; + return minerva.ServerConnector.getConfigurationParam("REQUEST_ACCOUNT_DEFAULT_CONTENT"); + }).then(function(result){ + content = encodeURIComponent(result); + url = 'mailto:'+email+'?subject=MINERVA account request&body='+content; + window.location.href=url; + }) + return false; + } //]]> </script> @@ -108,7 +120,7 @@ <br/> <a href="javascript:;" id="register_button" - onClick="window.location.href='mailto:#{userMB.requestAccountEmail}?subject=MINERVA account request'; return false;" + onClick="requestAccount(); return false" class="adminLink"><i class="fa fa-chevron-right"></i> REQUEST AN ACCOUNT</a> </h:form>