Skip to content
Snippets Groups Projects
Commit c51f6514 authored by smayer's avatar smayer
Browse files

Add dialog box for setting dataset sharing status to public

parent 9b5492c5
No related branches found
No related tags found
1 merge request!2Merging development into onb as preparation for Annolyzer release
......@@ -28,9 +28,17 @@ export default class extends Controller {
}
toggleSharingStatus(event) {
DatasetAPI.toggleSharingStatus(this.idValue, (data) => {
document.getElementById("dataset-info").outerHTML= data
})
if (document.getElementById("sharing_status").innerText == "Private") {
if (confirm("By clicking OK you agree that your username will be publicly displayed next to your dataset")) {
DatasetAPI.toggleSharingStatus(this.idValue, (data) => {
document.getElementById("dataset-info").outerHTML = data
})
}
} else {
DatasetAPI.toggleSharingStatus(this.idValue, (data) => {
document.getElementById("dataset-info").outerHTML = data
})
}
}
export(event) {
......
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