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

user can cancel agreement to terms of use and is logout immediatelly

parent a2632b70
......@@ -75,12 +75,21 @@ function requestConsent(user, termsOfUseUrl) {
}).catch(GuiConnector.alert);
}
});
var cancelButton = functions.createElement({
type: "button",
content: "I disagree",
className: "ui-button ui-corner-all ui-widget",
onclick: function () {
return ServerConnector.logout().catch(GuiConnector.alert);
}
});
$(okButton).prop("disabled", true);
$(checkbox).change(function () {
$(okButton).prop("disabled", !$(checkbox).is(':checked'));
});
dialogContent.appendChild(checkbox);
dialogContent.appendChild(okButton);
dialogContent.appendChild(cancelButton);
dialog.appendChild(dialogContent);
document.body.appendChild(dialog);
......
Markdown is supported
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