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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-8 / +16 lines)
Lines 679-685 Link Here
679
                                        </select>
679
                                        </select>
680
                                    </li>
680
                                    </li>
681
                                    <li>
681
                                    <li>
682
                                        <table>
682
                                        <table id="requestgroup">
683
                                            <thead>
683
                                            <thead>
684
                                                <tr>
684
                                                <tr>
685
                                                    <th>Hold</th>
685
                                                    <th>Hold</th>
Lines 1550-1564 Link Here
1550
1550
1551
            var msg = "";
1551
            var msg = "";
1552
1552
1553
            if ( ! $("#requestany").is(":checked") ) {
1553
            if ( $(".requestspecific").is(":checked") ) {
1554
                // requestany not selected, go through the item-specific cases
1554
                // requestany not selected, go through the item-specific cases
1555
                if ( $('input[type="radio"]:checked').length > 0 ) {
1555
                var selected_item = $('#requestspecific input[type="radio"]:checked');
1556
                if ( selected_item.length > 0 ) {
1556
                    // got item-specific hold requests in the form!
1557
                    // got item-specific hold requests in the form!
1557
                    // verify they have a pickup location selected
1558
                    // verify they have a pickup location selected
1558
1559
1559
                    if (table.find('input[type="radio"]:checked')
1560
                    if ( selected_item.closest('tr').find(".pickup_locations").val() == '' ) {
1560
                                .closest('tr')
1561
                                .find(".pickup_locations").val() === null) {
1562
1561
1563
                        msg = _("- Please select a pickup location for the item" + "\n")
1562
                        msg = _("- Please select a pickup location for the item" + "\n")
1564
                    }
1563
                    }
Lines 1566-1573 Link Here
1566
                else {
1565
                else {
1567
                    msg = (_("- Please select an item to place a hold") + "\n");
1566
                    msg = (_("- Please select an item to place a hold") + "\n");
1568
                }
1567
                }
1568
            } else if ( $("#requestgrp").is(":checked") ) {
1569
                var selected_group = $('#requestgroup input[type="radio"]:checked');
1570
                if( selected_group.length > 1 ){
1571
                    if( $("#pickup-item-group").length < 1 || $("#pickup-item-grp").val() == "" ){
1572
                        msg = _("- Please select a pickup location for this hold" + "\n");
1573
                    }
1574
                } else {
1575
                    msg = (_("- Please select an item group to place a hold") + "\n");
1576
                }
1569
            } else {
1577
            } else {
1570
                if( $("#pickup").length < 1 || $("#pickup").val() == "" ){
1578
                // Requesting next available
1579
                if( $("#pickup-next-avail").length < 1 || $("#pickup-next-avail").val() == "" ){
1571
                    msg = _("- Please select a pickup location for this hold" + "\n");
1580
                    msg = _("- Please select a pickup location for this hold" + "\n");
1572
                }
1581
                }
1573
            }
1582
            }
1574
- 

Return to bug 30579