|
Lines 1274-1279
Link Here
|
| 1274 |
<div id="batch-mode-setting" class="circ-setting"> |
1274 |
<div id="batch-mode-setting" class="circ-setting"> |
| 1275 |
<input type="checkbox" id="batch-mode-toggle" name="batch_mode" value="batch_mode" /> |
1275 |
<input type="checkbox" id="batch-mode-toggle" name="batch_mode" value="batch_mode" /> |
| 1276 |
<label for="batch-mode-toggle">Enable batch mode for multiple returns</label> |
1276 |
<label for="batch-mode-toggle">Enable batch mode for multiple returns</label> |
|
|
1277 |
|
| 1278 |
<div id="batch-mode-more-settings" class="" style="margin-left:50px;"> |
| 1279 |
<input type="checkbox" id="batch-mode-keep-selection" name="keep_selection" value="keep_selection" /> |
| 1280 |
<label for="batch-mode-toggle">Remember batch mode settings</label> |
| 1281 |
<br/> |
| 1282 |
<input type="checkbox" id="batch-mode-ignore-notissued" name="ignore_notissued" value="ignore_notissued" /> |
| 1283 |
<label for="batch-mode-toggle">Hide 'not checked out'-warnings</label> |
| 1284 |
<br/> |
| 1285 |
<input type="checkbox" id="batch-mode-confirm-hold" name="confirm_hold" value="confirm_hold" /> |
| 1286 |
<label for="batch-mode-toggle">Confirm hold when found</label> |
| 1287 |
<br/> |
| 1288 |
<input type="checkbox" id="batch-mode-confirm-transfer" name="confirm_transfer" value="confirm_transfer" /> |
| 1289 |
<label for="batch-mode-toggle">Confirm transfer when found</label> |
| 1290 |
</div> |
| 1277 |
</div> |
1291 |
</div> |
| 1278 |
|
1292 |
|
| 1279 |
[% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %] |
1293 |
[% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %] |
|
Lines 1343-1356
Link Here
|
| 1343 |
<div class="alert alert-info">Item transferred to [% result.messages.TransferTo %]</div> |
1357 |
<div class="alert alert-info">Item transferred to [% result.messages.TransferTo %]</div> |
| 1344 |
[% ELSIF code == 'NeedsTransfer' %] |
1358 |
[% ELSIF code == 'NeedsTransfer' %] |
| 1345 |
<div class="alert alert-warning">Item needs transfer</div> |
1359 |
<div class="alert alert-warning">Item needs transfer</div> |
|
|
1360 |
[% ELSIF code == 'RecallNeedsTransfer' %] |
| 1361 |
<div class="alert alert-warning">Recall needs transfer</div> |
| 1346 |
[% ELSIF code == 'NotIssued' %] |
1362 |
[% ELSIF code == 'NotIssued' %] |
| 1347 |
<div class="alert alert-warning">Item was not checked out</div> |
1363 |
<div class="alert alert-warning notissued">Item was not checked out</div> |
| 1348 |
[% ELSIF code == 'WasLost' %] |
1364 |
[% ELSIF code == 'WasLost' %] |
| 1349 |
<div class="alert alert-info">Item was lost, now found</div> |
1365 |
<div class="alert alert-info">Item was lost, now found</div> |
| 1350 |
[% ELSIF code == 'withdrawn' %] |
1366 |
[% ELSIF code == 'withdrawn' %] |
| 1351 |
<div class="alert alert-warning">Item is withdrawn</div> |
1367 |
<div class="alert alert-warning">Item is withdrawn</div> |
| 1352 |
[% ELSIF code == 'Debarred' %] |
1368 |
[% ELSIF code.match('Debarred|ForeverDebarred|PrevDebarred') %] |
| 1353 |
<div class="alert alert-danger">Patron is restricted</div> |
1369 |
<div class="alert alert-danger">Patron is restricted</div> |
|
|
1370 |
[% ELSIF code == 'ResFound' %] |
| 1371 |
<div class="alert alert-warning">Hold found</div> |
| 1372 |
[% ELSIF code == 'RecallFound' %] |
| 1373 |
<div class="alert alert-warning">Recall found</div> |
| 1374 |
[% ELSIF code == 'BadBarcode' %] |
| 1375 |
<div class="alert alert-warning">Bad barcode</div> |
| 1376 |
[% ELSIF code == 'TransferArrived' %] |
| 1377 |
<div class="alert alert-info">Transfer arrived from [% result.messages.TransferArrived %]</div> |
| 1378 |
[% ELSIF code == 'TransferredRecall' %] |
| 1379 |
<div class="alert alert-info">Recalled item has been transferred</div> |
| 1380 |
[% ELSIF code == 'WrongTransfer' %] |
| 1381 |
<div class="alert alert-warning">This item is still on transfer to [% result.messages.WrongTransfer %]</div> |
| 1382 |
[% ELSIF code == 'Wrongbranch'%] |
| 1383 |
<div class="alert alert-warning">This item cannot be returned to this branch</div> |
| 1384 |
[% ELSIF code == 'UpdateLastSeenError'%] |
| 1385 |
<div class="alert alert-warning">Error: Patron's last seen date could not be updated; see system logs.</div> |
| 1386 |
[% ELSIF code.match('Transfer(To|Trigger)|WrongTransferItem|WasReturned|LostItem.+|ProcessingFeeRefunded') # ignore %] |
| 1387 |
[% ELSIF code.match('ClaimAutoResolved|ReturnClaims') # ignored too for now %] |
| 1388 |
[% ELSIF code == 'InBundle' # TODO %] |
| 1389 |
[% ELSE # unexpected codes %] |
| 1390 |
<div class="alert alert-warning">Received code [% code %] from AddReturn. Contact support.</div> |
| 1354 |
[% END %] |
1391 |
[% END %] |
| 1355 |
[% END %] |
1392 |
[% END %] |
| 1356 |
</td> |
1393 |
</td> |
|
Lines 1601-1606
Link Here
|
| 1601 |
var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); |
1638 |
var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); |
| 1602 |
$("#barcode").focus(); |
1639 |
$("#barcode").focus(); |
| 1603 |
} |
1640 |
} |
|
|
1641 |
function ApplyBatchCheckinSettings() { |
| 1642 |
// check local storage key, fallback to system preference |
| 1643 |
var batch_mode_settings = localStorage.getItem("batch_mode_settings") || |
| 1644 |
'[% Koha.Preference('BatchCheckinDefaults') %]'; |
| 1645 |
|
| 1646 |
if ( batch_mode_settings.match('BATCH_CHECKIN_ENABLED') ) { |
| 1647 |
$("#show-circ-settings a").trigger('click'); |
| 1648 |
$('#batch-mode-toggle').prop('checked', true).trigger('change'); |
| 1649 |
} |
| 1650 |
if ( batch_mode_settings.match('BATCH_CHECKIN_KEEP_SELECTION') ) |
| 1651 |
$('#batch-mode-keep-selection').prop('checked', true); |
| 1652 |
if ( batch_mode_settings.match('BATCH_CHECKIN_IGNORE_NOTISSUED') ) { |
| 1653 |
$('#batch-mode-ignore-notissued').prop('checked', true); |
| 1654 |
$('div.alert.notissued').hide(); |
| 1655 |
} |
| 1656 |
|
| 1657 |
// Confirm hold setting depends on HoldsAutoFill |
| 1658 |
if ( "[% Koha.Preference('HoldsAutoFill') %]" == "1" ) |
| 1659 |
$('#batch-mode-confirm-hold') |
| 1660 |
.attr('title', '[% t("Forced by preference HoldsAutoFill") %]' ) |
| 1661 |
.prop('checked', true).prop('disabled', true); |
| 1662 |
else if ( batch_mode_settings.match('BATCH_CHECKIN_CONFIRM_HOLD') ) |
| 1663 |
$('#batch-mode-confirm-hold').prop('checked', true); |
| 1664 |
|
| 1665 |
// Confirm transfer setting depends on AutomaticItemReturn |
| 1666 |
if ( "[% Koha.Preference('AutomaticItemReturn') %]" == "1" ) |
| 1667 |
$('#batch-mode-confirm-transfer') |
| 1668 |
.attr('title', '[% t("Forced by preference AutomaticItemReturn") %]' ) |
| 1669 |
.prop('checked', true).prop('disabled', true); |
| 1670 |
else if ( batch_mode_settings.match('BATCH_CHECKIN_CONFIRM_TRANSFER') ) |
| 1671 |
$('#batch-mode-confirm-transfer').prop('checked', true); |
| 1672 |
} |
| 1673 |
function ChangeBatchCheckinSettings() { |
| 1674 |
// if user does not want to keep, we remove his settings in localStorage |
| 1675 |
if( !$('#batch-mode-keep-selection').prop('checked') ) { |
| 1676 |
localStorage.removeItem("batch_mode_settings"); |
| 1677 |
return; |
| 1678 |
} |
| 1679 |
|
| 1680 |
// Save current settings |
| 1681 |
var batch_mode_settings = 'BATCH_CHECKIN_KEEP_SELECTION,'; |
| 1682 |
if ( $('#batch-mode-toggle').prop('checked') ) batch_mode_settings += 'BATCH_CHECKIN_ENABLED,'; |
| 1683 |
if ( $('#batch-mode-ignore-notissued').prop('checked') ) batch_mode_settings += 'BATCH_CHECKIN_IGNORE_NOTISSUED,'; |
| 1684 |
if ( $('#batch-mode-confirm-hold').prop('checked') ) batch_mode_settings += 'BATCH_CHECKIN_CONFIRM_HOLD,'; |
| 1685 |
if ( $('#batch-mode-confirm-transfer').prop('checked') ) batch_mode_settings += 'BATCH_CHECKIN_CONFIRM_TRANSFER,'; |
| 1686 |
localStorage.setItem( "batch_mode_settings", batch_mode_settings ); |
| 1687 |
} |
| 1604 |
$(document).ready(function () { |
1688 |
$(document).ready(function () { |
| 1605 |
$("#checkin-form").preventDoubleFormSubmit(); |
1689 |
$("#checkin-form").preventDoubleFormSubmit(); |
| 1606 |
|
1690 |
|
|
Lines 1853-1858
Link Here
|
| 1853 |
'white-space': 'pre-wrap', |
1937 |
'white-space': 'pre-wrap', |
| 1854 |
'resize': 'vertical' |
1938 |
'resize': 'vertical' |
| 1855 |
}); |
1939 |
}); |
|
|
1940 |
$('#batch-mode-more-settings').show(); |
| 1856 |
} else { |
1941 |
} else { |
| 1857 |
// Switch back to single-line mode |
1942 |
// Switch back to single-line mode |
| 1858 |
$barcodeTextarea.attr({ |
1943 |
$barcodeTextarea.attr({ |
|
Lines 1864-1869
Link Here
|
| 1864 |
'white-space': 'nowrap', |
1949 |
'white-space': 'nowrap', |
| 1865 |
'resize': 'none' |
1950 |
'resize': 'none' |
| 1866 |
}); |
1951 |
}); |
|
|
1952 |
$('#batch-mode-more-settings').hide(); |
| 1867 |
} |
1953 |
} |
| 1868 |
$barcodeTextarea.focus(); |
1954 |
$barcodeTextarea.focus(); |
| 1869 |
}); |
1955 |
}); |
|
Lines 1887-1892
Link Here
|
| 1887 |
// Set a debounce timer to submit after RFID scanning finishes |
1973 |
// Set a debounce timer to submit after RFID scanning finishes |
| 1888 |
debounceTimer = setTimeout(function() { |
1974 |
debounceTimer = setTimeout(function() { |
| 1889 |
isReceivingRFIDInput = false; |
1975 |
isReceivingRFIDInput = false; |
|
|
1976 |
ChangeBatchCheckinSettings(); |
| 1890 |
$('#checkin-form').submit(); |
1977 |
$('#checkin-form').submit(); |
| 1891 |
}, 500); // 500ms delay after last input |
1978 |
}, 500); // 500ms delay after last input |
| 1892 |
} |
1979 |
} |
|
Lines 1918-1923
Link Here
|
| 1918 |
}); |
2005 |
}); |
| 1919 |
[% END %] |
2006 |
[% END %] |
| 1920 |
[% END %] |
2007 |
[% END %] |
|
|
2008 |
|
| 2009 |
ApplyBatchCheckinSettings(); |
| 2010 |
|
| 1921 |
}); |
2011 |
}); |
| 1922 |
</script> |
2012 |
</script> |
| 1923 |
[% END %] |
2013 |
[% END %] |
| 1924 |
- |
|
|