Skip to content
Snippets Groups Projects
Commit 27503fd6 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

request an account in the app uses params from server

parent c39e5193
No related branches found
No related tags found
1 merge request!196Resolve "add center button on the map"
Pipeline #
...@@ -11,6 +11,7 @@ var ConfigurationType = { ...@@ -11,6 +11,7 @@ var ConfigurationType = {
NEUTRAL_COLOR_VAL: "NEUTRAL_COLOR_VAL", NEUTRAL_COLOR_VAL: "NEUTRAL_COLOR_VAL",
OVERLAY_OPACITY: "OVERLAY_OPACITY", OVERLAY_OPACITY: "OVERLAY_OPACITY",
REQUEST_ACCOUNT_EMAIL: "REQUEST_ACCOUNT_EMAIL", REQUEST_ACCOUNT_EMAIL: "REQUEST_ACCOUNT_EMAIL",
REQUEST_ACCOUNT_DEFAULT_CONTENT: "REQUEST_ACCOUNT_DEFAULT_CONTENT",
SIMPLE_COLOR_VAL: "SIMPLE_COLOR_VAL", SIMPLE_COLOR_VAL: "SIMPLE_COLOR_VAL",
SEARCH_DISTANCE: "SEARCH_DISTANCE", SEARCH_DISTANCE: "SEARCH_DISTANCE",
SEARCH_RESULT_NUMBER: "SEARCH_RESULT_NUMBER", SEARCH_RESULT_NUMBER: "SEARCH_RESULT_NUMBER",
......
...@@ -328,7 +328,7 @@ ProjectInfoPanel.prototype._createUserDataTab = function () { ...@@ -328,7 +328,7 @@ ProjectInfoPanel.prototype._createUserDataTab = function () {
style: "display:none", style: "display:none",
content: '<h3><img src="./resources/images/profile.png" border="0" align="left"/>' content: '<h3><img src="./resources/images/profile.png" border="0" align="left"/>'
+ '<br/>User data</h3><br/>YOU ARE NOT LOGGED IN.<br/>' + '<center><button>LOGIN</button></center>' + + '<br/>User data</h3><br/>YOU ARE NOT LOGGED IN.<br/>' + '<center><button>LOGIN</button></center>' +
'<br/><a hreg="#" name="requestAccount">Request an account</a>', '<br/><a href="#" name="requestAccount">Request an account</a>',
xss: false xss: false
}); });
...@@ -369,9 +369,15 @@ ProjectInfoPanel.prototype.showUserProfilePage = function (user) { ...@@ -369,9 +369,15 @@ ProjectInfoPanel.prototype.showUserProfilePage = function (user) {
ProjectInfoPanel.prototype.init = function () { ProjectInfoPanel.prototype.init = function () {
var self = this; var self = this;
return ServerConnector.getConfigurationParam(ConfigurationType.REQUEST_ACCOUNT_EMAIL).then(function (value) { var email, content;
return ServerConnector.getConfigurationParam(ConfigurationType.REQUEST_ACCOUNT_EMAIL).then(function (result) {
email = result;
return ServerConnector.getConfigurationParam(ConfigurationType.REQUEST_ACCOUNT_DEFAULT_CONTENT);
}).then(function (result) {
content = encodeURIComponent(result);
var url = 'mailto:' + email + '?subject=MINERVA account request&body=' + content;
var link = $("[name=requestAccount]", self.getElement()); var link = $("[name=requestAccount]", self.getElement());
link.attr("href", "mailto:" + value + "?subject=MINERVA account request"); link.attr("href", url);
return self.refresh(); return self.refresh();
}); });
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment