From d3857686d7eb3014401273c4969e2818bd8fde8b Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Fri, 8 Jun 2018 10:46:32 +0200
Subject: [PATCH] terms of use link is invalid

---
 frontend-js/src/main/js/Configuration.js | 16 +++++++++++++++-
 frontend-js/src/main/js/minerva.js       |  2 +-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/frontend-js/src/main/js/Configuration.js b/frontend-js/src/main/js/Configuration.js
index 478c8deb93..4fea03415f 100644
--- a/frontend-js/src/main/js/Configuration.js
+++ b/frontend-js/src/main/js/Configuration.js
@@ -87,14 +87,28 @@ Configuration.prototype.getGitHash = function () {
   return this._gitHash;
 };
 
-
+/**
+ *
+ * @param {string} type
+ * @param {ConfigurationOption} value
+ */
 Configuration.prototype.setOption = function (type, value) {
   this._options[type] = value;
 };
+
+/**
+ *
+ * @param {string} type
+ * @returns {ConfigurationOption}
+ */
 Configuration.prototype.getOption = function (type) {
   return this._options[type];
 };
 
+/**
+ *
+ * @returns {Array}
+ */
 Configuration.prototype.getOptions = function () {
   var self = this;
   var result = [];
diff --git a/frontend-js/src/main/js/minerva.js b/frontend-js/src/main/js/minerva.js
index 65b6dcf08a..2382deb90c 100644
--- a/frontend-js/src/main/js/minerva.js
+++ b/frontend-js/src/main/js/minerva.js
@@ -411,7 +411,7 @@ function create(params) {
       GuiConnector.alert("Some data overlays doesn't have consent to the terms of the <a href='https://cloud.google.com/maps-platform/terms/' target='_blank'>license of Google Maps Platform</a>. To be able to visualize them you must edit data overlay. ")
     }
     if (user.getLogin() !== "anonymous" && !user.isTermsOfUseConsent()) {
-      requestConsent(user, params.getConfiguration().getOption(ConfigurationType.TERMS_OF_USE));
+      requestConsent(user, params.getConfiguration().getOption(ConfigurationType.TERMS_OF_USE).getValue());
     }
     var result = {
       destroy: function () {
-- 
GitLab