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

(-)a/koha-tmpl/intranet-tmpl/prog/js/additem.js (-3 / +15 lines)
Lines 45-52 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 countItemsBefore = $("#items_list tbody tr").length;
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
50
    var current_qty = parseInt( $('#quantity').val(), 10 );
63
    var current_qty = parseInt( $('#quantity').val(), 10 );
51
    $("#procModal").modal('show');
64
    $("#procModal").modal('show');
52
    $("#" + index).hide();
65
    $("#" + index).hide();
53
- 

Return to bug 38411