fixes #3620
This commit is contained in:
@@ -32,16 +32,16 @@
|
||||
if (($("#upload_file").val() === "") && ($("#upload_source").val() === "")) {
|
||||
error_messages.push("Must choose file or specify source");
|
||||
}
|
||||
if (!$("#upload_rating_s")[0].checked && !$("#upload_rating_q")[0].checked && !$("#upload_rating_e")[0].checked &&
|
||||
if (!$("#upload_rating_s").prop("checked") && !$("#upload_rating_q").prop("checked") && !$("#upload_rating_e").prop("checked") &&
|
||||
($("#upload_tag_string").val().search(/\brating:[sqe]/i) < 0)) {
|
||||
error_messages.push("Must specify a rating");
|
||||
}
|
||||
if (error_messages.length === 0) {
|
||||
$("#submit-button")[0].setAttribute("disabled","true");
|
||||
$("#submit-button")[0].setAttribute("value","Submitting...");
|
||||
$("#submit-button").prop("disabled","true");
|
||||
$("#submit-button").prop("value","Submitting...");
|
||||
$("#client-errors").hide();
|
||||
} else {
|
||||
$("#client-errors")[0].innerHTML = "<strong>Error</strong>: " + error_messages.join(", ");
|
||||
$("#client-errors").html("<strong>Error</strong>: " + error_messages.join(", "));
|
||||
$("#client-errors").show();
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user