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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt (+1 lines)
Lines 61-66 fieldset.rows table { clear: none; margin: 0; } Link Here
61
                                    <label for="biblionumber" class="required">Record:</label>
61
                                    <label for="biblionumber" class="required">Record:</label>
62
                                    <input type="text" name="biblionumber" id="biblionumber" value="[% bibnum | html %]" size="8" />
62
                                    <input type="text" name="biblionumber" id="biblionumber" value="[% bibnum | html %]" size="8" />
63
                                    (<input type="text" name="title" value="[% bibliotitle | html %]" disabled="disabled" readonly="readonly" />) <span class="required" title="Subscriptions must be associated with a bibliographic record">Required</span>
63
                                    (<input type="text" name="title" value="[% bibliotitle | html %]" disabled="disabled" readonly="readonly" />) <span class="required" title="Subscriptions must be associated with a bibliographic record">Required</span>
64
                                    <span id="error_bib_not_exist"></span>
64
                                    <div class="hint">Subscriptions must be associated with a bibliographic record</div>
65
                                    <div class="hint">Subscriptions must be associated with a bibliographic record</div>
65
                                    <div class="inputnote"> <a href="#" id="record_search"><i class="fa fa-search"></i> Search for record</a>
66
                                    <div class="inputnote"> <a href="#" id="record_search"><i class="fa fa-search"></i> Search for record</a>
66
                                        [% IF ( CAN_user_editcatalogue ) %]
67
                                        [% IF ( CAN_user_editcatalogue ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js (-3 / +28 lines)
Lines 52-63 function Check_page1() { Link Here
52
            return false;
52
            return false;
53
        }
53
        }
54
    }
54
    }
55
    if ($("#biblionumber").val().length == 0) {
55
56
    var biblionumber = $("#biblionumber").val()
57
    if ( biblionumber.length == 0 ) {
56
        alert( MSG_LINK_BIBLIO );
58
        alert( MSG_LINK_BIBLIO );
57
        return false;
59
        return false;
58
    }
60
    }
59
61
60
    return true;
62
    var bib_exists = $("input[name='title']").val().length;
63
64
    if (!bib_exists) alert(_("Bibliographic record does not exist!"));
65
    return bib_exists;
61
}
66
}
62
67
63
function Check_page2(){
68
function Check_page2(){
Lines 694-697 $(document).ready(function() { Link Here
694
        e.preventDefault();
699
        e.preventDefault();
695
        hidePredcitionPatternTest();
700
        hidePredcitionPatternTest();
696
    });
701
    });
702
703
    $("#biblionumber").on("change", function(){
704
        var biblionumber = $(this).val();
705
        $.ajax({
706
            url: "/api/v1/biblios/" + biblionumber,
707
            type: "GET",
708
            headers: {
709
              Accept: "application/json",
710
            },
711
            contentType: "application/json",
712
            success: function (biblio) {
713
                $("input[name='title']").val(biblio['title']);
714
                $("#error_bib_not_exist").html("");
715
            },
716
            error: function (x) {
717
                $("input[name='title']").val('');
718
                $("#error_bib_not_exist").html("This bibliographic record does not exist");
719
            }
720
        });
721
    });
722
697
});
723
});
698
- 

Return to bug 21232