@@ -, +, @@
---
koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js
@@ -7,6 +7,8 @@ $(document).ready(function() {
var onHoldDueDateSet = false;
+ var show_confirm = true;
+
var onHoldChecked = function() {
var isChecked = false;
$('input[data-on-reserve]').each(function() {
@@ -155,15 +157,13 @@ $(document).ready(function() {
var itemnumber = $(this).val();
- var can_renew = true;
-
- if( parseFloat(fines) > parseFloat(amountlimit) ) {
+ if(show_confirm && parseFloat(fines) > parseFloat(amountlimit) ) {
var result = confirm(MSG_CONFRIM_RENEW);
- if(result){
- can_renew = true;
- }else{
- can_renew = false;
+ if(!result){
+ return false;
}
+ // Prevent displaying confirm box again
+ show_confirm = false;
}
var params = {
@@ -228,10 +228,8 @@ $(document).ready(function() {
async: false,
});
- if(can_renew) {
- $(this).parent().parent().replaceWith("");
- renew(params);
- }
+ $(this).parent().parent().replaceWith("");
+ renew(params);
});
// Refocus on barcode field if it exists
--