|
|
@ -10,13 +10,6 @@ function doModal(data) { |
|
|
|
document.getElementsByClassName('modal-bg')[0].onclick = removeModal; |
|
|
|
document.getElementsByClassName('modal-bg')[0].onclick = removeModal; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function doTextResponse(text, url) { |
|
|
|
|
|
|
|
window.history.pushState({}, null, url); |
|
|
|
|
|
|
|
document.open('text/html', true); |
|
|
|
|
|
|
|
document.write(text); |
|
|
|
|
|
|
|
document.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const checkTypes = ['checkbox', 'radio']; |
|
|
|
const checkTypes = ['checkbox', 'radio']; |
|
|
|
function isCheckBox(element) { |
|
|
|
function isCheckBox(element) { |
|
|
|
return checkTypes.includes(element.type) |
|
|
|
return checkTypes.includes(element.type) |
|
|
@ -143,7 +136,7 @@ class formHandler { |
|
|
|
if (json) { |
|
|
|
if (json) { |
|
|
|
doModal(json); |
|
|
|
doModal(json); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//for bans, post form to show
|
|
|
|
//for bans, post form to show TODO: make modal support bans json and send dynamicresponse from it
|
|
|
|
this.clearFiles(); //dont resubmit files
|
|
|
|
this.clearFiles(); //dont resubmit files
|
|
|
|
this.banned = true; |
|
|
|
this.banned = true; |
|
|
|
this.form.dispatchEvent(new Event('submit')); |
|
|
|
this.form.dispatchEvent(new Event('submit')); |
|
|
|