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

when adding new data overlay there is checkbox that allows to set info about goolge maps consent

parent 2ea17d87
No related branches found
No related tags found
2 merge requests!311terms of use (not final),!310Resolve "Terms of use"
...@@ -458,6 +458,13 @@ OverlayPanel.prototype.openAddOverlayDialog = function () { ...@@ -458,6 +458,13 @@ OverlayPanel.prototype.openAddOverlayDialog = function () {
content.appendChild(contentInput); content.appendChild(contentInput);
content.appendChild(guiUtils.createNewLine()); content.appendChild(guiUtils.createNewLine());
var consentCheckbox = document.createElement("input");
consentCheckbox.type = "checkbox";
content.appendChild(consentCheckbox);
content.appendChild(guiUtils.createLabel("I am aware that this map is displayed under the terms of the <a href='https://cloud.google.com/maps-platform/terms/' target='_blank'>license of Google Maps Platform</a> and I agree to these terms. " +
"In particular, I warrant that this dataset does not contain Protected Health Information (as defined in and subject to HIPAA). "));
var buttons = [{ var buttons = [{
text: "UPLOAD", text: "UPLOAD",
click: function () { click: function () {
...@@ -477,6 +484,7 @@ OverlayPanel.prototype.openAddOverlayDialog = function () { ...@@ -477,6 +484,7 @@ OverlayPanel.prototype.openAddOverlayDialog = function () {
name: nameInput.value, name: nameInput.value,
description: descriptionInput.value, description: descriptionInput.value,
content: fileContent, content: fileContent,
googleLicenseConsent: consentCheckbox.checked,
filename: fileInput.value filename: fileInput.value
}; };
GuiConnector.showProcessing(); GuiConnector.showProcessing();
......
...@@ -100,10 +100,11 @@ public class OverlayController extends BaseController { ...@@ -100,10 +100,11 @@ public class OverlayController extends BaseController {
@RequestParam(value = "name") String name, // @RequestParam(value = "name") String name, //
@RequestParam(value = "description") String description, // @RequestParam(value = "description") String description, //
@RequestParam(value = "content") String content, // @RequestParam(value = "content") String content, //
@RequestParam(value = "filename") String filename, // @RequestParam(value = "filename") String filename, //
@RequestParam(value = "googleLicenseConsent") String googleLicenseConsent, //
@RequestParam(value = "type", defaultValue = "") String type // @RequestParam(value = "type", defaultValue = "") String type //
) throws SecurityException, QueryException, IOException { ) throws SecurityException, QueryException, IOException {
return overlayRestImp.addOverlay(token, projectId, name, description, content, filename, type); return overlayRestImp.addOverlay(token, projectId, name, description, content, filename, type, googleLicenseConsent);
} }
@RequestMapping(value = "/projects/{projectId}/overlays/{overlayId}", method = { RequestMethod.DELETE }, produces = { MediaType.APPLICATION_JSON_VALUE }) @RequestMapping(value = "/projects/{projectId}/overlays/{overlayId}", method = { RequestMethod.DELETE }, produces = { MediaType.APPLICATION_JSON_VALUE })
......
...@@ -212,7 +212,7 @@ public class OverlayRestImpl extends BaseRestImpl { ...@@ -212,7 +212,7 @@ public class OverlayRestImpl extends BaseRestImpl {
this.layoutDao = layoutDao; this.layoutDao = layoutDao;
} }
public LayoutView addOverlay(String token, String projectId, String name, String description, String content, String filename, String type) public LayoutView addOverlay(String token, String projectId, String name, String description, String content, String filename, String type, String googleLicenseConsent)
throws SecurityException, QueryException, IOException { throws SecurityException, QueryException, IOException {
AuthenticationToken authenticationToken = getUserService().getToken(token); AuthenticationToken authenticationToken = getUserService().getToken(token);
User user = getUserService().getUserByToken(token); User user = getUserService().getUserByToken(token);
...@@ -239,7 +239,7 @@ public class OverlayRestImpl extends BaseRestImpl { ...@@ -239,7 +239,7 @@ public class OverlayRestImpl extends BaseRestImpl {
LayoutView layout = layoutService.createLayout( LayoutView layout = layoutService.createLayout(
new CreateLayoutParams() new CreateLayoutParams()
.async(false).colorInputStream(stream).description(description).layoutFileName(filename).model(model).name(name).user(user) .async(false).colorInputStream(stream).description(description).layoutFileName(filename).model(model).name(name).user(user)
.colorSchemaType(colorSchemaType).directory(".")); .colorSchemaType(colorSchemaType).directory(".").googleLicenseConsent(googleLicenseConsent.equalsIgnoreCase("true")));
return layoutService.getLayoutById(model, Integer.valueOf(layout.getIdObject()), authenticationToken); return layoutService.getLayoutById(model, Integer.valueOf(layout.getIdObject()), authenticationToken);
} catch (InvalidColorSchemaException e) { } catch (InvalidColorSchemaException e) {
throw new QueryException(e.getMessage(), e); throw new QueryException(e.getMessage(), e);
......
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