$(document).ready(function () {
$("form").submit(function () { //Prevent form submit globally
return false;
- }).each(function () {
- this.reset();
- });
+ }).trigger("reset"); //Reset forms
+
+ //Force enable start buttons if previously disabled
+ $("#start-controls input[type='button']").removeAttr("disabled");
//Set the status updated
$("#state-exp").setStatusUpdater();
</p>
<p class="centre">
-
<input type="button" name="start_explode" value="Explode test">
<input type="button" name="start_strain" value="Strain test">
</p>
data : data
}).done(function (data) {
if (!result.checkStatus(data)) {
- return;
+ $(group).removeAttr('disabled');
+ return;
}
//Select the can
data : {name : "can_select", set : can_number}
}).done(function (data) {
if (!result.checkStatus(data)) {
+ $(group).removeAttr('disabled');
return;
}
data : {name : "can_enable", set : 1}
}).done(function (data) {
if (!result.checkStatus(data)) {
+ $(group).removeAttr('disabled');
return;
}
result.html(" ");
toggleControls(true);
- }).always(function () {
+ }).fail(function () {
$(group).removeAttr('disabled');
});
}).fail(function () {