From ae96e7457c4f5807ca9be49b1c99e7d36321caab Mon Sep 17 00:00:00 2001 From: davide Date: Thu, 15 Nov 2018 16:37:55 +0100 Subject: [PATCH] Re-activating button in case of failure --- parts/static/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parts/static/script.js b/parts/static/script.js index 4235383..455cccf 100644 --- a/parts/static/script.js +++ b/parts/static/script.js @@ -263,7 +263,9 @@ function octopartFetch(){ $('#description-input').val(''); $('#description-input').attr('placeholder', json['result']); } - }); + }).fail(function() { + $('#magic-autofill-button').removeAttr('disabled'); + }); } $(document).ready(function() {