Commit b6674bc5 authored by Oliver Feldt's avatar Oliver Feldt
Browse files

Search field blocks now, while async request is running

parent cc0f74d5
......@@ -58,6 +58,7 @@ jQuery.each( [ "put", "delete" ], function( i, method ) {
$("#search_form").on("submit", function(e) {
var radio_id = $("#radio_id").val();
$("#search_form input").prop('readonly', true);
$.getJSON(
"/radios",
......@@ -87,7 +88,10 @@ $("#search_form").on("submit", function(e) {
$("#radio").modal("show");
}
}
);
).always(function() {
$("#search_form input").prop('readonly', false);
});
$("#radio_id").val("");
e.preventDefault();
});
......
Supports Markdown
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