Enable submit button after exception

parent a31f1cba
......@@ -120,12 +120,13 @@ function show_msg_layer(msg) {
function edit_submit() {
let article_content = quill.root.innerHTML;
alert(quill.root.innerText);
let title = document.getElementById('edit-article-title').value;
let tags = document.getElementById('edit-article-tags').value;
let status = document.getElementById('edit-article-status').value
let update_timestamp = document.getElementById('edit-update-timestamp');
let submit_button = $("#submit-button")[0];
let submit_button = document.getElementById("submit-button");
submit_button.innerText = "Submiting...";
submit_button.disabled = true;
......@@ -144,7 +145,11 @@ function edit_submit() {
}),
success: function (data) {
if ("failed" === data)
{
show_msg_layer("Edit failed, please check!");
submit_button.innerText = "Submit";
submit_button.disabled = false;
}
else if (typeof title == 'undefined')
window.location.pathname = "/about";
else
......
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