|
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 |
if ( batch_mode_settings.match('BATCH_CHECKIN_CONFIRM_HOLD') ) |
| 1657 |
$('#batch-mode-confirm-hold').prop('checked', true); |
| 1658 |
if ( batch_mode_settings.match('BATCH_CHECKIN_CONFIRM_TRANSFER') ) |
| 1659 |
$('#batch-mode-confirm-transfer').prop('checked', true); |
| 1660 |
} |
| 1661 |
function ChangeBatchCheckinSettings() { |
| 1662 |
// if user does not want to keep, we remove his settings in localStorage |
| 1663 |
if( !$('#batch-mode-keep-selection').prop('checked') ) { |
| 1664 |
localStorage.removeItem("batch_mode_settings"); |
| 1665 |
return; |
| 1666 |
} |
| 1667 |
|
| 1668 |
// Save current settings |
| 1669 |
var batch_mode_settings = 'BATCH_CHECKIN_KEEP_SELECTION,'; |
| 1670 |
if ( $('#batch-mode-toggle').prop('checked') ) batch_mode_settings += 'BATCH_CHECKIN_ENABLED,'; |
| 1671 |
if ( $('#batch-mode-ignore-notissued').prop('checked') ) batch_mode_settings += 'BATCH_CHECKIN_IGNORE_NOTISSUED,'; |
| 1672 |
if ( $('#batch-mode-confirm-hold').prop('checked') ) batch_mode_settings += 'BATCH_CHECKIN_CONFIRM_HOLD,'; |
| 1673 |
if ( $('#batch-mode-confirm-transfer').prop('checked') ) batch_mode_settings += 'BATCH_CHECKIN_CONFIRM_TRANSFER,'; |
| 1674 |
localStorage.setItem( "batch_mode_settings", batch_mode_settings ); |
| 1675 |
} |
| 1604 |
$(document).ready(function () { |
1676 |
$(document).ready(function () { |
| 1605 |
$("#checkin-form").preventDoubleFormSubmit(); |
1677 |
$("#checkin-form").preventDoubleFormSubmit(); |
| 1606 |
|
1678 |
|
|
Lines 1853-1858
Link Here
|
| 1853 |
'white-space': 'pre-wrap', |
1925 |
'white-space': 'pre-wrap', |
| 1854 |
'resize': 'vertical' |
1926 |
'resize': 'vertical' |
| 1855 |
}); |
1927 |
}); |
|
|
1928 |
$('#batch-mode-more-settings').show(); |
| 1856 |
} else { |
1929 |
} else { |
| 1857 |
// Switch back to single-line mode |
1930 |
// Switch back to single-line mode |
| 1858 |
$barcodeTextarea.attr({ |
1931 |
$barcodeTextarea.attr({ |
|
Lines 1864-1869
Link Here
|
| 1864 |
'white-space': 'nowrap', |
1937 |
'white-space': 'nowrap', |
| 1865 |
'resize': 'none' |
1938 |
'resize': 'none' |
| 1866 |
}); |
1939 |
}); |
|
|
1940 |
$('#batch-mode-more-settings').hide(); |
| 1867 |
} |
1941 |
} |
| 1868 |
$barcodeTextarea.focus(); |
1942 |
$barcodeTextarea.focus(); |
| 1869 |
}); |
1943 |
}); |
|
Lines 1887-1892
Link Here
|
| 1887 |
// Set a debounce timer to submit after RFID scanning finishes |
1961 |
// Set a debounce timer to submit after RFID scanning finishes |
| 1888 |
debounceTimer = setTimeout(function() { |
1962 |
debounceTimer = setTimeout(function() { |
| 1889 |
isReceivingRFIDInput = false; |
1963 |
isReceivingRFIDInput = false; |
|
|
1964 |
ChangeBatchCheckinSettings(); |
| 1890 |
$('#checkin-form').submit(); |
1965 |
$('#checkin-form').submit(); |
| 1891 |
}, 500); // 500ms delay after last input |
1966 |
}, 500); // 500ms delay after last input |
| 1892 |
} |
1967 |
} |
|
Lines 1918-1923
Link Here
|
| 1918 |
}); |
1993 |
}); |
| 1919 |
[% END %] |
1994 |
[% END %] |
| 1920 |
[% END %] |
1995 |
[% END %] |
|
|
1996 |
|
| 1997 |
ApplyBatchCheckinSettings(); |
| 1998 |
|
| 1921 |
}); |
1999 |
}); |
| 1922 |
</script> |
2000 |
</script> |
| 1923 |
[% END %] |
2001 |
[% END %] |
| 1924 |
- |
|
|