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

(-)a/koha-tmpl/intranet-tmpl/prog/js/additem.js (-2 / +15 lines)
Lines 45-51 function addItem( node, unique_item_fields ) { Link Here
45
}
45
}
46
46
47
function addMulti( count, node, unique_item_fields){
47
function addMulti( count, node, unique_item_fields){
48
    var index = $(node).closest("div").attr('id');
48
    var item_form = $(node).closest("div");
49
    var index = item_form.attr("id");
50
51
    //We need to verify the item form before saving
52
    var empty_item_mandatory = CheckMandatorySubfields(item_form);
53
    if (empty_item_mandatory > 0) {
54
        var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
55
56
        _alertString +="-------------------------------------------------------------------\n\n";
57
        _alertString +=
58
            "\n- " + _("%s item mandatory fields empty").format(empty_item_mandatory);
59
        alert(_alertString);
60
        return false;
61
    }
62
49
    var countItemsBefore = $("#items_list tbody tr").length;
63
    var countItemsBefore = $("#items_list tbody tr").length;
50
    var current_qty = parseInt( $('#quantity').val(), 10 );
64
    var current_qty = parseInt( $('#quantity').val(), 10 );
51
    $("#procModal").modal('show');
65
    $("#procModal").modal('show');
52
- 

Return to bug 38411