View | Details | Raw Unified | Return to bug 30579
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-45 / +50 lines)
Lines 465-517 Link Here
465
                                <label for="holdnotes">Notes:</label>
465
                                <label for="holdnotes">Notes:</label>
466
                                <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
466
                                <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
467
                            </li>
467
                            </li>
468
                            <li>
469
                                <label for="pickup">Pickup at:</label>
470
                                <select name="pickup" id="pickup"
471
                                        data-biblio-id="[% biblio.biblionumber | html %]"
472
                                        data-patron-id="[% patron.borrowernumber | html %]"
473
                                        data-pickup-location-source="biblio">
474
                                    [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
475
                                </select>
476
                            </li>
477
                            [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
478
                                <li>
479
                                    <label for="itemtype">Request specific item type:</label>
480
                                    <select name="itemtype" id="itemtype">
481
                                        <option value="">Any item type</option>
482
                                        [%- FOREACH itemtype IN available_itemtypes %]
483
                                            <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
484
                                        [%- END %]
485
                                    </select>
486
                                </li>
487
                            [% END %]
488
                            [% IF ( reserve_in_future ) %]
468
                            [% IF ( reserve_in_future ) %]
489
                                <li>
469
                                <li>
490
                                    <label for="from">Hold starts on date:</label>
470
                                    <label for="from">Hold starts on date:</label>
491
                                    <input id="reserve_date" name="reserve_date" id="from" size="10" type="text" data-date_to="expiration_date" class="flatpickr" data-flatpickr-futuredate="true" />
471
                                    <input id="reserve_date" name="reserve_date" id="from" size="10" type="text" data-date_to="expiration_date" class="flatpickr" data-flatpickr-futuredate="true" />
492
                                </li>
472
                                </li>
493
                            [% END %]
473
                            [% END %]
494
                                <li>
495
                                    <label for="requestany">Hold next available item </label>
496
                                    [% IF force_hold_level == 'item' %]
497
                                        <input type="checkbox" id="requestany" name="request" disabled="true" />
498
                                    [% ELSIF force_hold_level == 'record' %]
499
                                        <input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/>
500
                                        <input type="hidden" name="request" value="Any"/>
501
                                    [% ELSE %]
502
                                        <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
503
                                    [% END %]
504
                                    <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
505
                                </li>
506
474
507
                                [% IF remaining_holds_for_record > 1 %]
508
                                    <li>
509
                                        <label for="holds_to_place_count">Holds to place (count)</label>
510
                                        <input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" maxlength="[% remaining_holds_for_record | html %]" value="1" />
511
                                    </li>
512
                                [% ELSE %]
513
                                    <input type="hidden" name="holds_to_place_count" value="1" />
514
                                [% END %]
515
475
516
                            <li>
476
                            <li>
517
                                <label for="to">Hold expires on date:</label>
477
                                <label for="to">Hold expires on date:</label>
Lines 522-527 Link Here
522
                                <input name="non_priority" id="non_priority" type="checkbox" />
482
                                <input name="non_priority" id="non_priority" type="checkbox" />
523
                                <span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span>
483
                                <span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span>
524
                            </li>
484
                            </li>
485
                            <fieldset>
486
                                <legend>
487
                                    <label for="requestany">
488
                                        Hold next available item
489
                                        [% IF force_hold_level == 'item' %]
490
                                            <input type="checkbox" id="requestany" name="request" disabled="true" />
491
                                        [% ELSIF force_hold_level == 'record' %]
492
                                            <input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/>
493
                                            <input type="hidden" name="request" value="Any"/>
494
                                        [% ELSE %]
495
                                            <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
496
                                        [% END %]
497
                                        <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
498
                                    </label>
499
                                </legend>
500
                                <ol>
501
                                    <li>
502
                                        <label for="pickup">Pickup at:</label>
503
                                        <select name="pickup" id="pickup"
504
                                                data-biblio-id="[% biblio.biblionumber | html %]"
505
                                                data-patron-id="[% patron.borrowernumber | html %]"
506
                                                data-pickup-location-source="biblio">
507
                                            [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
508
                                        </select>
509
                                    </li>
510
                                    [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
511
                                        <li>
512
                                            <label for="itemtype">Request specific item type:</label>
513
                                            <select name="itemtype" id="itemtype">
514
                                                <option value="">Any item type</option>
515
                                                [%- FOREACH itemtype IN available_itemtypes %]
516
                                                    <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
517
                                                [%- END %]
518
                                            </select>
519
                                        </li>
520
                                    [% END %]
521
                                    [% IF remaining_holds_for_record > 1 %]
522
                                        <li>
523
                                            <label for="holds_to_place_count">Holds to place (count)</label>
524
                                            <input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" maxlength="[% remaining_holds_for_record | html %]" value="1" />
525
                                        </li>
526
                                    [% ELSE %]
527
                                        <input type="hidden" name="holds_to_place_count" value="1" />
528
                                    [% END %]
529
                                </ol>
530
                            </fieldset>
525
                        </ol>
531
                        </ol>
526
                        <fieldset class="action">
532
                        <fieldset class="action">
527
                            [% IF ( patron.borrowernumber ) %]
533
                            [% IF ( patron.borrowernumber ) %]
Lines 1246-1254 Link Here
1246
            });
1252
            });
1247
            function ToggleHoldsToPlace() {
1253
            function ToggleHoldsToPlace() {
1248
                if ( $("#requestany").prop('checked') ) {
1254
                if ( $("#requestany").prop('checked') ) {
1249
                    $("#holds_to_place_count").prop('disabled', false);
1255
                    $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', false);
1250
                } else {
1256
                } else {
1251
                    $("#holds_to_place_count").prop('disabled', true);
1257
                    $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', true);
1252
                }
1258
                }
1253
            }
1259
            }
1254
            ToggleHoldsToPlace();
1260
            ToggleHoldsToPlace();
Lines 1488-1497 Link Here
1488
                });
1494
                });
1489
                if(onechecked == 1){
1495
                if(onechecked == 1){
1490
                    $("#requestany").prop("checked", false);
1496
                    $("#requestany").prop("checked", false);
1491
                    $("#holds_to_place_count").prop('disabled', true);
1497
                    $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', true);
1492
                } else {
1498
                } else {
1493
                    $("#requestany").prop("checked",true);
1499
                    $("#requestany").prop("checked",true);
1494
                    $("#holds_to_place_count").prop('disabled', false);
1500
                    $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', false);
1495
                }
1501
                }
1496
            });
1502
            });
1497
            var prev_rank_request;
1503
            var prev_rank_request;
1498
- 

Return to bug 30579