POST not /POST and invert checkbox state before submitting.
This commit is contained in:
parent
42aa573698
commit
722d3701ac
|
@ -408,7 +408,7 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
web.setDir = function () {
|
web.setDir = function () {
|
||||||
var dir = document.getElementById('dir').checked;
|
var dir = !document.getElementById('dir').checked;
|
||||||
/*$.ajax({
|
/*$.ajax({
|
||||||
method : 'POST',
|
method : 'POST',
|
||||||
url : '/dir',
|
url : '/dir',
|
||||||
|
@ -418,7 +418,7 @@
|
||||||
success : web.setDirSuccess
|
success : web.setDirSuccess
|
||||||
});*/
|
});*/
|
||||||
var opts = {
|
var opts = {
|
||||||
method : '/POST',
|
method : 'POST',
|
||||||
body : { dir : dir}
|
body : { dir : dir}
|
||||||
};
|
};
|
||||||
fetch('/dir', opts).then(web.setDirSuccess);
|
fetch('/dir', opts).then(web.setDirSuccess);
|
||||||
|
|
Loading…
Reference in New Issue