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

(-)a/cataloguing/additem.pl (+12 lines)
Lines 648-653 if ( $op eq "cud-additem" ) { Link Here
648
        $item->store;
648
        $item->store;
649
    }
649
    }
650
650
651
    if ( $input->param('edit-serial-issue') ) {
652
        my $serialid = $item->serial_item->serialid;
653
        my $serial   = Koha::Serials->find($serialid);
654
655
        my $redirect = "/cgi-bin/koha/serials/serials-edit.pl?serialid=$serialid";
656
        if ($serial) {
657
            $redirect .= "&subscriptionid=" . $serial->subscriptionid;
658
        }
659
        print $input->redirect($redirect);
660
        exit;
661
    }
662
651
    $nextop = "cud-additem";
663
    $nextop = "cud-additem";
652
} elsif ( $op eq "delinkitem" ) {
664
} elsif ( $op eq "delinkitem" ) {
653
665
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/edit_serial_issues.inc (+20 lines)
Line 0 Link Here
1
[% USE Item %]
2
3
<!-- edit_serial_issues.inc -->
4
<!-- Edit serials confirmation dialog -->
5
<div class="modal fade" id="edit-serial-issues-modal" tabindex="-1" role="dialog" aria-labelledby="edit-serial-issues-modal-label">
6
    <div class="modal-dialog" role="document">
7
        <div class="modal-content">
8
            <div class="modal-header">
9
                <h4 class="modal-title" id="edit-serial-issues-modal-label">Edit serial issues</h4>
10
            </div>
11
            <div class="modal-body">
12
                <h5 style="margin-bottom: 15px;">This item has a serial issue linked to it, would you like to edit this as well?</h5>
13
            </div>
14
            <div class="modal-footer">
15
                <button id="edit-serial-issues-modal-btn-submit" type="button" class="btn btn-primary"><i class="fa fa-exclamation-circle"></i> Edit serial issue</button>
16
                <button id="no-edit-serial-issues-modal-btn-submit" class="btn btn-default deny cancel" href="#" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i> Save item without editing serial issue</button>
17
            </div>
18
        </div>
19
    </div>
20
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-1 / +8 lines)
Lines 409-415 Link Here
409
                                [% IF op != 'add_item' %]
409
                                [% IF op != 'add_item' %]
410
                                    <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
410
                                    <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
411
                                [% END %]
411
                                [% END %]
412
                                <input type="submit" value="Save changes" onclick="return Check(this.form)" />
412
                                [% IF Item.HasSerialItem(itemnumber) == 0 %]
413
                                    <input type="submit" value="Save changes" onclick="return Check(this.form)" />
414
                                [% ELSE %]
415
                                    <input type="button" class="submit" value="Save changes" onclick="return ShowSerialEditingConfirmation(this.form)" />
416
                                    <input type="hidden" name="edit-serial-issue" id="edit-serial-issue" value />
417
                                [% END %]
413
                                <input type="button" id="addnewitem" value="Add a new item" />
418
                                <input type="button" id="addnewitem" value="Add a new item" />
414
                                <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a>
419
                                <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a>
415
                            [% END %]</fieldset
420
                            [% END %]</fieldset
Lines 421-426 Link Here
421
                        <input type="hidden" name="barcode" value="[% barcode | html %]" />
426
                        <input type="hidden" name="barcode" value="[% barcode | html %]" />
422
                        <input type="hidden" name="duedatespec" value="[% duedatespec | html %]" />
427
                        <input type="hidden" name="duedatespec" value="[% duedatespec | html %]" />
423
                        [%# End fields for fast cataloging %]
428
                        [%# End fields for fast cataloging %]
429
430
                        [% INCLUDE 'modals/edit_serial_issues.inc' %]
424
                    </form>
431
                    </form>
425
432
426
                    [% INCLUDE 'modals/cataloguing_create_av.inc' %]
433
                    [% INCLUDE 'modals/cataloguing_create_av.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js (-1 / +25 lines)
Lines 181-186 $(document).ready(function () { Link Here
181
        return $("#" + $(this).data("item") + "-delete-item-form").submit();
181
        return $("#" + $(this).data("item") + "-delete-item-form").submit();
182
    });
182
    });
183
183
184
    $(document).on(
185
        "click",
186
        "#edit-serial-issues-modal-btn-submit",
187
        function (e) {
188
            e.preventDefault();
189
            $("#edit-serial-issues-modal").modal("hide");
190
            $("#edit-serial-issue").val("1");
191
            return $("#f").submit();
192
        }
193
    );
194
    $(document).on(
195
        "click",
196
        "#no-edit-serial-issues-modal-btn-submit",
197
        function (e) {
198
            e.preventDefault();
199
            $("#edit-serial-issues-modal").modal("hide");
200
            return $("#f").submit();
201
        }
202
    );
203
184
    /* On page load, check for location.hash in the page URL */
204
    /* On page load, check for location.hash in the page URL */
185
    /* If present the location hash will be used to scroll to the relevant anchor */
205
    /* If present the location hash will be used to scroll to the relevant anchor */
186
    var hash = location.hash;
206
    var hash = location.hash;
Lines 267-269 function Dopop(link, i) { Link Here
267
        "width=500,height=400,toolbar=false,scrollbars=yes"
287
        "width=500,height=400,toolbar=false,scrollbars=yes"
268
    );
288
    );
269
}
289
}
270
- 
290
291
function ShowSerialEditingConfirmation(form) {
292
    $("#edit-serial-issues-modal").modal("show");
293
    return false;
294
}

Return to bug 37116