Commit a2c94d68 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

request an account uses default content from congfiguration

parent da4f85dc
Pipeline #3487 passed with stage
in 58 seconds
......@@ -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),
;
......
......@@ -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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment