Fix double submit after focusing OK button (#1309)

This commit is contained in:
jekkos
2017-05-24 09:21:58 +02:00
parent 15bb3ad6a3
commit 37097babcf
3 changed files with 5 additions and 4 deletions

View File

@@ -74,7 +74,7 @@
<link rel="stylesheet" type="text/css" href="dist/style.css"/>
<!-- end mincss template tags -->
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=88dbff2d6f"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=cb34f35a8d"></script>
<!-- end minjs template tags -->
<?php endif; ?>

View File

File diff suppressed because one or more lines are too long

View File

@@ -17,6 +17,7 @@
if (button_id == 'submit') {
$('form', dlog_ref.$modalBody).first().submit();
}
return false;
}
};
@@ -256,7 +257,6 @@
var submit_handler = function(url) {
return function (resource, response) {
var id = response.id;
if (!response.success) {
$.notify(response.message, { type: 'danger' });
} else {
@@ -287,6 +287,7 @@
}
$.notify(message, {type: 'success' });
}
return false;
};
};