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

(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (+7 lines)
Lines 880-885 fieldset { Link Here
880
            font-size: 110%;
880
            font-size: 110%;
881
            font-weight: bold;
881
            font-weight: bold;
882
            margin-left: 1em;
882
            margin-left: 1em;
883
884
            label {
885
                display: inline-block;
886
                float: none;
887
                margin: .2em;
888
                width: auto;
889
            }
883
        }
890
        }
884
891
885
        li {
892
        li {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-95 / +97 lines)
Lines 435-443 Link Here
435
                </div>
435
                </div>
436
436
437
                [% UNLESS ( multi_hold ) %]
437
                [% UNLESS ( multi_hold ) %]
438
                    <fieldset class="rows">
438
                    <form action="placerequest.pl" method="post" name="form" id="hold-request-form">
439
                        <legend>Hold details</legend>
439
                        <fieldset class="rows">
440
                        <form action="placerequest.pl" method="post" name="form" id="hold-request-form">
440
                            <legend>Hold details</legend>
441
441
442
                            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
442
                            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
443
                            <input type="hidden" name="type" value="str8" />
443
                            <input type="hidden" name="type" value="str8" />
Lines 461-470 Link Here
461
                                <span class="label">Estimated priority:</span>
461
                                <span class="label">Estimated priority:</span>
462
                                <strong>[% fixedRank | html %]</strong>
462
                                <strong>[% fixedRank | html %]</strong>
463
                            </li>
463
                            </li>
464
                            <li>
465
                                <label for="holdnotes">Notes:</label>
466
                                <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
467
                            </li>
468
                            [% IF ( reserve_in_future ) %]
464
                            [% IF ( reserve_in_future ) %]
469
                                <li>
465
                                <li>
470
                                    <label for="from">Hold starts on date:</label>
466
                                    <label for="from">Hold starts on date:</label>
Lines 482-533 Link Here
482
                                <input name="non_priority" id="non_priority" type="checkbox" />
478
                                <input name="non_priority" id="non_priority" type="checkbox" />
483
                                <span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span>
479
                                <span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span>
484
                            </li>
480
                            </li>
485
                            <fieldset>
481
                            <li>
486
                                <legend>
482
                                <label for="holdnotes">Notes:</label>
487
                                    <label for="requestany">
483
                                <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
488
                                        Hold next available item
484
                            </li>
489
                                        [% IF force_hold_level == 'item' %]
485
                        </ol>
490
                                            <input type="checkbox" id="requestany" name="request" disabled="true" />
486
                    </fieldset>
491
                                        [% ELSIF force_hold_level == 'record' %]
487
492
                                            <input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/>
488
                    <fieldset class="rows">
493
                                            <input type="hidden" name="request" value="Any"/>
489
                        <legend>
494
                                        [% ELSE %]
490
                            <label for="requestany">
495
                                            <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
491
                                Hold next available item
496
                                        [% END %]
492
                                [% IF force_hold_level == 'item' %]
497
                                        <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
493
                                    <input type="radio" class="requestany" id="requestany" name="request" disabled="true" />
498
                                    </label>
494
                                [% ELSIF force_hold_level == 'record' %]
499
                                </legend>
495
                                    <input type="radio" class="requestany" id="requestany" checked="checked" value="Any" disabled="true"/>
500
                                <ol>
496
                                    <input type="hidden" name="request" value="Any"/>
501
                                    <li>
497
                                [% ELSE %]
502
                                        <label for="pickup">Pickup at:</label>
498
                                    <input type="radio" class="requestany" id="requestany" name="request" checked="checked" value="Any" />
503
                                        <select name="pickup" id="pickup"
499
                                [% END %]
504
                                                data-biblio-id="[% biblio.biblionumber | html %]"
500
                                <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
505
                                                data-patron-id="[% patron.borrowernumber | html %]"
501
                            </label>
506
                                                data-pickup-location-source="biblio">
502
                        </legend>
507
                                            [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
503
                        <ol>
508
                                        </select>
504
                            <li>
509
                                    </li>
505
                                <label for="pickup">Pickup at:</label>
510
                                    [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
506
                                <select name="pickup" id="pickup"
511
                                        <li>
507
                                        data-biblio-id="[% biblio.biblionumber | html %]"
512
                                            <label for="itemtype">Request specific item type:</label>
508
                                        data-patron-id="[% patron.borrowernumber | html %]"
513
                                            <select name="itemtype" id="itemtype">
509
                                        data-pickup-location-source="biblio">
514
                                                <option value="">Any item type</option>
510
                                    [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
515
                                                [%- FOREACH itemtype IN available_itemtypes %]
511
                                </select>
516
                                                    <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
512
                            </li>
517
                                                [%- END %]
513
                            [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
518
                                            </select>
514
                                <li>
519
                                        </li>
515
                                    <label for="itemtype">Request specific item type:</label>
520
                                    [% END %]
516
                                    <select name="itemtype" id="itemtype">
521
                                    [% IF remaining_holds_for_record > 1 %]
517
                                        <option value="">Any item type</option>
522
                                        <li>
518
                                        [%- FOREACH itemtype IN available_itemtypes %]
523
                                            <label for="holds_to_place_count">Holds to place (count)</label>
519
                                            <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
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" />
520
                                        [%- END %]
525
                                        </li>
521
                                    </select>
526
                                    [% ELSE %]
522
                                </li>
527
                                        <input type="hidden" name="holds_to_place_count" value="1" />
523
                            [% END %]
528
                                    [% END %]
524
                            [% IF remaining_holds_for_record > 1 %]
529
                                </ol>
525
                                <li>
530
                            </fieldset>
526
                                    <label for="holds_to_place_count">Holds to place (count)</label>
527
                                    <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" />
528
                                </li>
529
                            [% ELSE %]
530
                                <input type="hidden" name="holds_to_place_count" value="1" />
531
                            [% END %]
531
                        </ol>
532
                        </ol>
532
                        <fieldset class="action">
533
                        <fieldset class="action">
533
                            [% IF ( patron.borrowernumber ) %]
534
                            [% IF ( patron.borrowernumber ) %]
Lines 540-545 Link Here
540
                                [% END %]
541
                                [% END %]
541
                            [% END %]
542
                            [% END %]
542
                        </fieldset>
543
                        </fieldset>
544
                    </fieldset>
545
546
                    <hr />
547
548
                    <fieldset class="rows">
549
                        <legend>
550
                            <label>
551
                                Place a hold on a specific item
552
                                <input type="radio" name="request" class="requestany" />
553
                            </label>
554
                            [% IF force_hold_level == 'item' %]
555
                                <span class="error"><em>Required</em></span>
556
                            [% END %]
557
                        </legend>
543
558
544
                        [% biblio = biblioloop.0 %]
559
                        [% biblio = biblioloop.0 %]
545
560
Lines 559-571 Link Here
559
                            [% END %]
574
                            [% END %]
560
                        </ol>
575
                        </ol>
561
576
562
                        <h2 style="padding: 0 1em;">
563
                            Place a hold on a specific item
564
                            [% IF force_hold_level == 'item' %]
565
                                 <span class="error"><em>(Required)</em></span>
566
                            [% END %]
567
                        </h2>
568
569
                        <table id="requestspecific">
577
                        <table id="requestspecific">
570
                            <thead>
578
                            <thead>
571
                                <tr>
579
                                <tr>
Lines 600-608 Link Here
600
                                                        Hold must be record level
608
                                                        Hold must be record level
601
                                                    </span>
609
                                                    </span>
602
                                                [% ELSIF ( itemloo.available ) %]
610
                                                [% ELSIF ( itemloo.available ) %]
603
                                                    <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" />
611
                                                    <input type="radio" name="checkitem" class="requestspecific" value="[% itemloo.itemnumber | html %]" />
604
                                                [% ELSIF ( itemloo.override ) %]
612
                                                [% ELSIF ( itemloo.override ) %]
605
                                                    <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" />
613
                                                    <input type="radio" name="checkitem" class="needsoverride requestspecific" value="[% itemloo.itemnumber | html %]" />
606
                                                    <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
614
                                                    <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
607
                                                [% ELSE %]
615
                                                [% ELSE %]
608
                                                    <span class="error">
616
                                                    <span class="error">
Lines 645-651 Link Here
645
                                            </td>
653
                                            </td>
646
                                            <td>
654
                                            <td>
647
                                            [% IF (itemloo.pickup_locations_count > 0) %]
655
                                            [% IF (itemloo.pickup_locations_count > 0) %]
648
                                                <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;"
656
                                                <select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations requestspecific" style="width:100%;"
649
                                                        data-item-id="[% itemloo.itemnumber | html %]"
657
                                                        data-item-id="[% itemloo.itemnumber | html %]"
650
                                                        data-patron-id="[% patron.borrowernumber | html %]"
658
                                                        data-patron-id="[% patron.borrowernumber | html %]"
651
                                                        data-pickup-location-source="item">
659
                                                        data-pickup-location-source="item">
Lines 751-761 Link Here
751
                        </table> <!-- /#requestspecific -->
759
                        </table> <!-- /#requestspecific -->
752
760
753
                        [% IF hiddencount %]
761
                        [% IF hiddencount %]
754
                            <form>
762
                            <p class="hiddencount">
755
                                <p class="hiddencount">
763
                                <a href="request.pl?biblionumber=[% biblio.biblionumber | uri %]&amp;borrowernumber=[% borrowernumber | uri %]&amp;showallitems=1">Show all items ([% biblio.hiddencount | html %] hidden)</a>
756
                                    <a href="request.pl?biblionumber=[% biblio.biblionumber | uri %]&amp;borrowernumber=[% borrowernumber | uri %]&amp;showallitems=1">Show all items ([% biblio.hiddencount | html %] hidden)</a>
764
                            </p>
757
                                </p>
758
                            </form>
759
                        [% END # /IF hiddencount %]
765
                        [% END # /IF hiddencount %]
760
766
761
                            <fieldset class="action">
767
                            <fieldset class="action">
Lines 769-776 Link Here
769
                                    [% END %]
775
                                    [% END %]
770
                                [% END # /IF patron %]
776
                                [% END # /IF patron %]
771
                            </fieldset> <!-- /.action -->
777
                            </fieldset> <!-- /.action -->
772
                        </form> <!-- /#hold-request-form -->
778
                        </fieldset> <!-- /.rows -->
773
                    </fieldset> <!-- /.rows -->
779
                    </form> <!-- /#hold-request-form -->
774
                [% ELSE # Multi-hold %]
780
                [% ELSE # Multi-hold %]
775
                    <fieldset class="rows">
781
                    <fieldset class="rows">
776
                        <legend>Hold details</legend>
782
                        <legend>Hold details</legend>
Lines 801-810 Link Here
801
                                [% END %]
807
                                [% END %]
802
                            </li>
808
                            </li>
803
809
804
                            <li>
805
                                <label for="holdnotes">Notes:</label>
806
                                <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
807
                            </li>
808
                            <li>
810
                            <li>
809
                                <label for="pickup">Pickup at:</label>
811
                                <label for="pickup">Pickup at:</label>
810
                                <select name="pickup" id="pickup_multi" data-patron-id="[% patron.borrowernumber | html %]">
812
                                <select name="pickup" id="pickup_multi" data-patron-id="[% patron.borrowernumber | html %]">
Lines 815-821 Link Here
815
                                </select>
817
                                </select>
816
                            </li>
818
                            </li>
817
819
818
819
                            [% IF ( reserve_in_future ) %]
820
                            [% IF ( reserve_in_future ) %]
820
                                <li>
821
                                <li>
821
                                    <label for="from">Hold starts on date:</label>
822
                                    <label for="from">Hold starts on date:</label>
Lines 834-839 Link Here
834
                                <input name="non_priority" id="non_priority" type="checkbox" />
835
                                <input name="non_priority" id="non_priority" type="checkbox" />
835
                                <span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span>
836
                                <span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span>
836
                            </li>
837
                            </li>
838
839
                            <li>
840
                                <label for="holdnotes">Notes:</label>
841
                                <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
842
                            </li>
837
                        </ol>
843
                        </ol>
838
844
839
845
Lines 941-950 Link Here
941
                                [% END %]
947
                                [% END %]
942
                            [% END # /IF patron %]
948
                            [% END # /IF patron %]
943
                        </fieldset> <!-- /.action -->
949
                        </fieldset> <!-- /.action -->
944
                    </form> <!-- /#hold-request-form -->
950
                    </fieldset> <!-- /.rows -->
945
                </fieldset> <!-- /.rows -->
951
                </form> <!-- /#hold-request-form -->
946
                [% END %]
952
                [% END # /UNLESS ( multi_hold ) %]
947
                [% END %]
953
            [% END # /UNLESS club OR patron... %]
948
954
949
            [% UNLESS ( patron ) %]
955
            [% UNLESS ( patron ) %]
950
                [% UNLESS borrowers %]
956
                [% UNLESS borrowers %]
Lines 1250-1264 Link Here
1250
                    $(this).find("input.focus").focus();
1256
                    $(this).find("input.focus").focus();
1251
                }
1257
                }
1252
            });
1258
            });
1253
            function ToggleHoldsToPlace() {
1259
1254
                if ( $("#requestany").prop('checked') ) {
1255
                    $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', false);
1256
                } else {
1257
                    $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', true);
1258
                }
1259
            }
1260
            ToggleHoldsToPlace();
1260
            ToggleHoldsToPlace();
1261
            $("#requestany").on('change', function(){
1261
            $(".requestany").on('change', function(){
1262
                ToggleHoldsToPlace();
1262
                ToggleHoldsToPlace();
1263
            });
1263
            });
1264
1264
Lines 1277-1289 Link Here
1277
                "sDom": '<"top pager"ilf>t',
1277
                "sDom": '<"top pager"ilf>t',
1278
            }));
1278
            }));
1279
1279
1280
            //Override fieldset styling for dataTables search box
1281
            $("div.top.pager").css("margin-left","1em");
1282
            $(".dataTables_filter label").css({
1283
                "width":"auto",
1284
                "margin-right":"0em"
1285
            });
1286
1287
            $("#club-request-form").on("submit", function() {
1280
            $("#club-request-form").on("submit", function() {
1288
                let $t = $(this);
1281
                let $t = $(this);
1289
                $('.clubalert, .holdalert').addClass('hide');
1282
                $('.clubalert, .holdalert').addClass('hide');
Lines 1382-1387 Link Here
1382
            });
1375
            });
1383
        });
1376
        });
1384
1377
1378
        function ToggleHoldsToPlace() {
1379
            if ( $("#requestany").prop('checked') ) {
1380
                $("#holds_to_place_count, #pickup, #itemtype").prop('disabled', false);
1381
                $(".requestspecific").prop("disabled", true );
1382
            } else {
1383
                $("#holds_to_place_count, #pickup, #itemtype").prop('disabled', true);
1384
                $(".requestspecific").prop("disabled", false );
1385
            }
1386
        }
1387
1385
        function check( table ) {
1388
        function check( table ) {
1386
1389
1387
            var msg = "";
1390
            var msg = "";
1388
- 

Return to bug 30579