|
Lines 168-173
Link Here
|
| 168 |
</div> |
168 |
</div> |
| 169 |
[% END %] |
169 |
[% END %] |
| 170 |
|
170 |
|
|
|
171 |
[% IF ( failed_holds ) %] |
| 172 |
<div class="dialog alert"> |
| 173 |
<strong>One or more holds were not placed due to following errors:</strong> |
| 174 |
<ul> |
| 175 |
[% FOREACH fail IN failed_holds %] |
| 176 |
<li> |
| 177 |
[% SWITCH fail %] |
| 178 |
[% CASE 'damaged' %] |
| 179 |
<span>Item is damaged</span> |
| 180 |
[% CASE 'ageRestricted' %] |
| 181 |
<span>The record and its items are age restricted</span> |
| 182 |
[% CASE 'tooManyHoldsForThisRecord' %] |
| 183 |
<span>Patron exceeded the number of concurrent holds for this record</span> |
| 184 |
[% CASE 'tooManyReservesToday' %] |
| 185 |
<span>Patron reached daily holds limit</span> |
| 186 |
[% CASE 'tooManyReserves' %] |
| 187 |
<span>Too many holds already</span> |
| 188 |
[% CASE 'notReservable' %] |
| 189 |
<span>Not holdable</span> |
| 190 |
[% CASE 'cannotReserveFromOtherBranches' %] |
| 191 |
<span>Patron from a different library</span> |
| 192 |
[% CASE 'branchNotInHoldGroup' %] |
| 193 |
<span>Holds are not allowed from patron's library</span> |
| 194 |
[% CASE 'itemAlreadyOnHold' %] |
| 195 |
<span>Patron already has a hold for failed item(s)</span> |
| 196 |
[% CASE 'cannotBeTransferred' %] |
| 197 |
<span>Cannot be transferred to pickup library</span> |
| 198 |
[% CASE 'pickupNotInHoldGroup' %] |
| 199 |
<span>The chosen pickup location is not allowed</span> |
| 200 |
[% CASE 'noReservesAllowed' %] |
| 201 |
<span>No holds are allowed on failed item(s)</span> |
| 202 |
[% CASE 'libraryNotPickupLocation' %] |
| 203 |
<span>Library is not a valid pickup location</span> |
| 204 |
[% CASE 'no_valid_pickup_location' %] |
| 205 |
<span>No valid pickup location</span> |
| 206 |
[% CASE 'notforloan' %] |
| 207 |
<span>Not for loan</span> |
| 208 |
[% CASE 'items_available' %] |
| 209 |
<span>There are items available in the library</span> |
| 210 |
[% CASE 'not_placed' %] |
| 211 |
<span>Error when placing hold</span> |
| 212 |
[% CASE %] |
| 213 |
<span>Error: [% fail | html %]</span> |
| 214 |
[% END %] |
| 215 |
</li> |
| 216 |
[% END %] |
| 217 |
</ul> |
| 218 |
</div> |
| 219 |
[% END %] |
| 220 |
|
| 171 |
[% UNLESS ( multi_hold ) %] |
221 |
[% UNLESS ( multi_hold ) %] |
| 172 |
<h2>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %] by [% biblio.author | html %][% END %]</h2> |
222 |
<h2>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %] by [% biblio.author | html %][% END %]</h2> |
| 173 |
[% ELSE %] |
223 |
[% ELSE %] |
|
Lines 736-744
Link Here
|
| 736 |
Hold must be item group level |
786 |
Hold must be item group level |
| 737 |
</span> |
787 |
</span> |
| 738 |
[% ELSIF ( itemloo.available ) %] |
788 |
[% ELSIF ( itemloo.available ) %] |
| 739 |
<input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" /> |
789 |
<input type="checkbox" name="checkitem" value="[% itemloo.itemnumber | html %]" /> |
| 740 |
[% ELSIF ( itemloo.override ) %] |
790 |
[% ELSIF ( itemloo.override ) %] |
| 741 |
<input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" /> |
791 |
<input type="checkbox" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" /> |
| 742 |
<i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i> |
792 |
<i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i> |
| 743 |
[% ELSE %] |
793 |
[% ELSE %] |
| 744 |
<span class="error"> |
794 |
<span class="error"> |
|
Lines 1507-1517
Link Here
|
| 1507 |
|
1557 |
|
| 1508 |
if ( ! $("#requestany").is(":checked") ) { |
1558 |
if ( ! $("#requestany").is(":checked") ) { |
| 1509 |
// requestany not selected, go through the item-specific cases |
1559 |
// requestany not selected, go through the item-specific cases |
| 1510 |
if ( $('input[type="radio"]:checked').length > 0 ) { |
1560 |
if ( $('input[name="checkitem"]:checked').length > 0 ) { |
| 1511 |
// got item-specific hold requests in the form! |
1561 |
// got item-specific hold requests in the form! |
| 1512 |
// verify they have a pickup location selected |
1562 |
// verify they have a pickup location selected |
| 1513 |
|
1563 |
|
| 1514 |
if (table.find('input[type="radio"]:checked') |
1564 |
if (table.find('input[name="checkitem"]:checked') |
| 1515 |
.closest('tr') |
1565 |
.closest('tr') |
| 1516 |
.find(".pickup_locations").val() === null) { |
1566 |
.find(".pickup_locations").val() === null) { |
| 1517 |
|
1567 |
|
|
Lines 1602-1616
Link Here
|
| 1602 |
} |
1652 |
} |
| 1603 |
}); |
1653 |
}); |
| 1604 |
$("input[name=checkitem]").click(function() { |
1654 |
$("input[name=checkitem]").click(function() { |
| 1605 |
onechecked = 0; |
1655 |
let onechecked = 0; |
| 1606 |
$("input[name=checkitem]").each(function() { |
1656 |
$("input[name=checkitem]").each(function() { |
| 1607 |
if(this.checked){ |
1657 |
if(this.checked){ |
| 1608 |
onechecked = 1; |
1658 |
onechecked++; |
| 1609 |
} |
1659 |
} |
| 1610 |
}); |
1660 |
}); |
| 1611 |
if(onechecked == 1){ |
1661 |
if(onechecked > 0){ |
| 1612 |
$("#requestany").prop("checked", false); |
1662 |
$("#requestany").prop("checked", false); |
| 1613 |
$("#holds_to_place_count").prop('disabled', true); |
1663 |
$("#holds_to_place_count").prop('disabled', true); |
|
|
1664 |
|
| 1665 |
$("#holds_to_place_count").val(onechecked); |
| 1614 |
} else { |
1666 |
} else { |
| 1615 |
$("#requestany").prop("checked",true); |
1667 |
$("#requestany").prop("checked",true); |
| 1616 |
$("#holds_to_place_count").prop('disabled', false); |
1668 |
$("#holds_to_place_count").prop('disabled', false); |
|
Lines 1676-1685
Link Here
|
| 1676 |
|
1728 |
|
| 1677 |
[% IF Koha.Preference('EnableItemGroupHolds') %] |
1729 |
[% IF Koha.Preference('EnableItemGroupHolds') %] |
| 1678 |
$(':radio[name="item_group_id"]').change(function(){ |
1730 |
$(':radio[name="item_group_id"]').change(function(){ |
| 1679 |
$(':radio[name="checkitem"]').prop('checked', false); |
1731 |
$('input[name="checkitem"]').prop('checked', false); |
| 1680 |
}); |
1732 |
}); |
| 1681 |
|
1733 |
|
| 1682 |
$(':radio[name="checkitem"]').change(function(){ |
1734 |
$('input[name="checkitem"]').change(function(){ |
| 1683 |
$(':radio[name="item_group_id"]').prop('checked', false); |
1735 |
$(':radio[name="item_group_id"]').prop('checked', false); |
| 1684 |
}); |
1736 |
}); |
| 1685 |
[% END %] |
1737 |
[% END %] |