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

(-)a/cataloguing/additem.pl (-1 lines)
Lines 931-937 $template->param( Link Here
931
    itemtagfield     => $itemtagfield,
931
    itemtagfield     => $itemtagfield,
932
    itemtagsubfield  => $itemtagsubfield,
932
    itemtagsubfield  => $itemtagsubfield,
933
    op      => $nextop,
933
    op      => $nextop,
934
    opisadd => ($nextop eq "saveitem") ? 0 : 1,
935
    popup => scalar $input->param('popup') ? 1: 0,
934
    popup => scalar $input->param('popup') ? 1: 0,
936
    C4::Search::enabled_staff_search_views,
935
    C4::Search::enabled_staff_search_views,
937
);
936
);
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc (-1 / +1 lines)
Lines 4-10 Link Here
4
    var biblionumber = '[% biblionumber | html %]';
4
    var biblionumber = '[% biblionumber | html %]';
5
    var frameworkcode = '[% frameworkcode | html %]';
5
    var frameworkcode = '[% frameworkcode | html %]';
6
    var popup = '[% popup | html %]';
6
    var popup = '[% popup | html %]';
7
    var opisadd = '[% opisadd | html %]';
7
    var op = '[% op | html %]';
8
    var LABEL_EDIT_ITEM = _("Edit item");
8
    var LABEL_EDIT_ITEM = _("Edit item");
9
    var LABEL_DELETE_ITEM = _("Delete item");
9
    var LABEL_DELETE_ITEM = _("Delete item");
10
    var MSG_FORM_NOT_SUBMITTED = _("Form not submitted because of the following problem(s)");
10
    var MSG_FORM_NOT_SUBMITTED = _("Form not submitted because of the following problem(s)");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-2 / +2 lines)
Lines 127-133 Link Here
127
        <input type="hidden" name="popup" value="1" />
127
        <input type="hidden" name="popup" value="1" />
128
    [% END %]
128
    [% END %]
129
    <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
129
    <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
130
    [% IF ( opisadd ) %]
130
    [% IF op != 'saveitem' %]
131
        <h2 id="additema">Add item [% IF (circborrowernumber) %]<em>(fast cataloging)</em>[% END %]</h2>
131
        <h2 id="additema">Add item [% IF (circborrowernumber) %]<em>(fast cataloging)</em>[% END %]</h2>
132
    [% ELSE %]
132
    [% ELSE %]
133
        <h2 id="edititem">Edit Item #[% itemnumber | html %][% IF ( barcode ) %] / Barcode [% barcode | html %][% END %]</h2>
133
        <h2 id="edititem">Edit Item #[% itemnumber | html %][% IF ( barcode ) %] / Barcode [% barcode | html %][% END %]</h2>
Lines 210-216 Link Here
210
    <input type="hidden" name="indicator" value=" " />
210
    <input type="hidden" name="indicator" value=" " />
211
    <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
211
    <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
212
212
213
<fieldset class="action">    [% IF ( opisadd ) %]
213
<fieldset class="action">    [% IF op != 'saveitem' %]
214
    <input type="submit" name="phony_submit" value="phony_submit" id="phony_submit" style="display:none;" onclick="return false;" />
214
    <input type="submit" name="phony_submit" value="phony_submit" id="phony_submit" style="display:none;" onclick="return false;" />
215
    <!-- Note : We use here a false submit button because we have several submit buttons and we don't want the user to believe they validated the adding of multiple items
215
    <!-- Note : We use here a false submit button because we have several submit buttons and we don't want the user to believe they validated the adding of multiple items
216
		when pressing the enter key, while in fact it is the first submit button that is validated, in our case the "add (single) item" button.
216
		when pressing the enter key, while in fact it is the first submit button that is validated, in our case the "add (single) item" button.
(-)a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js (-7 / +4 lines)
Lines 1-4 Link Here
1
/* global KOHA searchid biblionumber frameworkcode popup opisadd LABEL_EDIT_ITEM LABEL_DELETE_ITEM MSG_FORM_NOT_SUBMITTED MSG_MANDATORY_FIELDS_EMPTY MSG_ADD_MULTIPLE_ITEMS MSG_ENTER_NUM_ITEMS MSG_CONFIRM_DELETE_ITEM MSG_CONFIRM_ADD_ITEM columns_settings CheckMandatorySubfields CheckMultipleAdd */
1
/* global KOHA searchid biblionumber frameworkcode popup op LABEL_EDIT_ITEM LABEL_DELETE_ITEM MSG_FORM_NOT_SUBMITTED MSG_MANDATORY_FIELDS_EMPTY MSG_ADD_MULTIPLE_ITEMS MSG_ENTER_NUM_ITEMS MSG_CONFIRM_DELETE_ITEM MSG_CONFIRM_ADD_ITEM columns_settings CheckMandatorySubfields CheckMultipleAdd */
2
2
3
var browser = KOHA.browser(searchid, parseInt(biblionumber, 10));
3
var browser = KOHA.browser(searchid, parseInt(biblionumber, 10));
4
browser.show();
4
browser.show();
Lines 9-18 $(document).ready(function(){ Link Here
9
    // otherwise the deletion confirmation will not work correctly
9
    // otherwise the deletion confirmation will not work correctly
10
    $('a[href*="biblionumber="]').off('click');
10
    $('a[href*="biblionumber="]').off('click');
11
11
12
    if( popup ){
12
    if( popup && op != 'saveitem' ){
13
        if( opisadd ){
13
        window.close();
14
            window.close();
15
        }
16
    }
14
    }
17
15
18
    $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
16
    $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
Lines 116-119 function Dopop(link,i) { Link Here
116
114
117
function confirm_deletion() {
115
function confirm_deletion() {
118
    return confirm( MSG_CONFIRM_DELETE_ITEM );
116
    return confirm( MSG_CONFIRM_DELETE_ITEM );
119
}
117
}
120
- 

Return to bug 22669