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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc (+2 lines)
Lines 1-5 Link Here
1
<script type="text/javascript">
1
<script type="text/javascript">
2
//<![CDATA[
2
//<![CDATA[
3
var MSG_ADDITEM_JS_ADDITEM = _("Add item");
4
var MSG_ADDITEM_JS_UPDATEITEM = _("Update item");
3
var MSG_ADDITEM_JS_EDIT = _("Edit");
5
var MSG_ADDITEM_JS_EDIT = _("Edit");
4
var MSG_ADDITEM_JS_DELETE = _("Delete");
6
var MSG_ADDITEM_JS_DELETE = _("Delete");
5
var MSG_ADDITEM_JS_CLEAR = _("Clear");
7
var MSG_ADDITEM_JS_CLEAR = _("Clear");
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/additem.js (-4 / +2 lines)
Lines 12-18 function addItem( node, unique_item_fields ) { Link Here
12
            if ( current_qty < max_qty - 1 )
12
            if ( current_qty < max_qty - 1 )
13
                cloneItemBlock(index, unique_item_fields);
13
                cloneItemBlock(index, unique_item_fields);
14
            addItemInList(index, unique_item_fields);
14
            addItemInList(index, unique_item_fields);
15
            $("#" + index).find("input[name='buttonPlus']").val("Update");
15
            $("#" + index).find("input[name='buttonPlus']").val( (window.MSG_ADDITEM_JS_UPDATEITEM || "Update item") );
16
            $("#quantity").val(current_qty + 1).change();
16
            $("#quantity").val(current_qty + 1).change();
17
        } else if ( current_qty >= max_qty ) {
17
        } else if ( current_qty >= max_qty ) {
18
            alert(window.MSG_ADDITEM_JS_CANT_RECEIVE_MORE_ITEMS
18
            alert(window.MSG_ADDITEM_JS_CANT_RECEIVE_MORE_ITEMS
Lines 135-142 function cloneItemBlock(index, unique_item_fields) { Link Here
135
            });
135
            });
136
            /* Add buttons + and Clear */
136
            /* Add buttons + and Clear */
137
            var buttonPlus = "<fieldset class=\"action\">";
137
            var buttonPlus = "<fieldset class=\"action\">";
138
            var buttonPlusText = _("Add item");
138
                buttonPlus += '<input type="button" class="addItemControl" name="buttonPlus" style="cursor:pointer; margin:0 1em;" onclick="addItem(this,\'' + unique_item_fields + '\')" value="' + (window.MSG_ADDITEM_JS_ADDITEM || 'Add item')+ '" />';
139
                buttonPlus += '<input type="button" class="addItemControl" name="buttonPlus" style="cursor:pointer; margin:0 1em;" onclick="addItem(this,\'' + unique_item_fields + '\')" value="' + buttonPlusText + '" />';
140
                buttonPlus += '<a class="addItemControl cancel" name="buttonClear" style="cursor:pointer;" onclick="clearItemBlock(this)">' + (window.MSG_ADDITEM_JS_CLEAR || 'Clear') + '</a>';
139
                buttonPlus += '<a class="addItemControl cancel" name="buttonClear" style="cursor:pointer;" onclick="clearItemBlock(this)">' + (window.MSG_ADDITEM_JS_CLEAR || 'Clear') + '</a>';
141
                buttonPlus += "</fieldset>";
140
                buttonPlus += "</fieldset>";
142
            $(clone).append(buttonPlus);
141
            $(clone).append(buttonPlus);
143
- 

Return to bug 10576