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

(-)a/cataloguing/additem.pl (+12 lines)
Lines 655-660 if ( $op eq "cud-additem" ) { Link Here
655
        $item->store;
655
        $item->store;
656
    }
656
    }
657
657
658
    if ( $input->param('edit-serial-issue') ) {
659
        my $serialid = $item->serial_item->serialid;
660
        print $input->redirect("/cgi-bin/koha/serials/serials-edit.pl?serialid=$serialid");
661
        exit;
662
    }
663
664
    if ( $input->param('edit-serial-issue') ) {
665
        my $serialid = $item->serial_item->serialid;
666
        print $input->redirect("/cgi-bin/koha/serials/serials-edit.pl?serialid=$serialid");
667
        exit;
668
    }
669
658
    $nextop = "cud-additem";
670
    $nextop = "cud-additem";
659
} elsif ( $op eq "delinkitem" ) {
671
} elsif ( $op eq "delinkitem" ) {
660
672
(-)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 / +7 lines)
Lines 367-373 Link Here
367
    [% IF op != 'add_item' %]
367
    [% IF op != 'add_item' %]
368
        <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
368
        <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
369
    [% END %]
369
    [% END %]
370
    <input type="submit" value="Save changes" onclick="return Check(this.form)">
370
    [% IF Item.HasSerialItem(itemnumber) == 0 %]
371
        <input type="submit" value="Save changes" onclick="return Check(this.form)">
372
    [% ELSE %]
373
        <input type="button" class="submit" value="Save changes" onclick="return ShowSerialEditingConfirmation(this.form)">
374
        <input type="hidden" name="edit-serial-issue" id="edit-serial-issue" value />
375
    [% END %]
371
    <input type="button" id="addnewitem" value="Add a new item">
376
    <input type="button" id="addnewitem" value="Add a new item">
372
    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a>
377
    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a>
373
    [% END %]</fieldset>
378
    [% END %]</fieldset>
Lines 380-385 Link Here
380
    [%# End fields for fast cataloging %]
385
    [%# End fields for fast cataloging %]
381
386
382
387
388
    [% INCLUDE 'modals/edit_serial_issues.inc' %]
383
    </form>
389
    </form>
384
390
385
    [% INCLUDE 'modals/cataloguing_create_av.inc' %]
391
    [% INCLUDE 'modals/cataloguing_create_av.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js (-1 / +17 lines)
Lines 155-160 $(document).ready(function(){ Link Here
155
        }
155
        }
156
        return $("#" + $(this).data("item") + "-delete-item-form").submit();
156
        return $("#" + $(this).data("item") + "-delete-item-form").submit();
157
    });
157
    });
158
159
    $(document).on('click', '#edit-serial-issues-modal-btn-submit', function(e) {
160
        e.preventDefault();
161
        $('#edit-serial-issues-modal').modal('hide');
162
        $('#edit-serial-issue').val('1');
163
        return $("#f").submit();
164
    });
165
    $(document).on('click', '#no-edit-serial-issues-modal-btn-submit', function(e) {
166
        e.preventDefault();
167
        $('#edit-serial-issues-modal').modal('hide');
168
        return $("#f").submit();
169
    });
158
});
170
});
159
171
160
function CheckTemplateForm(f) {
172
function CheckTemplateForm(f) {
Lines 220-222 function Dopop(link,i) { Link Here
220
    var defaultvalue=document.forms[0].field_value[i].value;
232
    var defaultvalue=document.forms[0].field_value[i].value;
221
    var newin=window.open(link+"&result=" + defaultvalue,"valuebuilder",'width=500,height=400,toolbar=false,scrollbars=yes');
233
    var newin=window.open(link+"&result=" + defaultvalue,"valuebuilder",'width=500,height=400,toolbar=false,scrollbars=yes');
222
}
234
}
223
- 
235
236
function ShowSerialEditingConfirmation(form) {
237
    $('#edit-serial-issues-modal').modal();
238
    return false;
239
}

Return to bug 37116