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

Return to bug 30579