forked from rDrama/rDrama
minor fix
parent
134a9f4e44
commit
e975e46d31
|
@ -244,12 +244,12 @@ function submit(form) {
|
||||||
xhr.setRequestHeader('xhr', 'xhr');
|
xhr.setRequestHeader('xhr', 'xhr');
|
||||||
|
|
||||||
xhr.onload = function() {
|
xhr.onload = function() {
|
||||||
|
submitButton.disabled = false;
|
||||||
uploadfilelist.classList.add("d-none")
|
uploadfilelist.classList.add("d-none")
|
||||||
if (xhr.status >= 200 && xhr.status < 300) {
|
if (xhr.status >= 200 && xhr.status < 300) {
|
||||||
const post_id = JSON.parse(xhr.response)['post_id'];
|
const post_id = JSON.parse(xhr.response)['post_id'];
|
||||||
location.href = "/post/" + post_id
|
location.href = "/post/" + post_id
|
||||||
} else {
|
} else {
|
||||||
submitButton.disabled = false;
|
|
||||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||||
try {
|
try {
|
||||||
let data=JSON.parse(xhr.response);
|
let data=JSON.parse(xhr.response);
|
||||||
|
|
Loading…
Reference in New Issue