
initLang();

document.getElementById("cguButton").addEventListener("click", function(e) {
    e.preventDefault();
    var xhr = new XMLHttpRequest();
    xhr.onreadystatechange = function(e) {
        if (xhr.readyState === 4) {
            if (xhr.status === 204) {
                document.location.reload();
            } else {
                //FIXME error
            }
        }
    };
    xhr.open('PUT', 'account/cguAccept', true);
    xhr.send(null);
    return false;
});

