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 / +7 lines)
Lines 372-378 Link Here
372
    [% IF op != 'add_item' %]
372
    [% IF op != 'add_item' %]
373
        <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
373
        <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
374
    [% END %]
374
    [% END %]
375
    <input type="submit" value="Save changes" onclick="return Check(this.form)">
375
    [% IF Item.HasSerialItem(itemnumber) == 0 %]
376
        <input type="submit" value="Save changes" onclick="return Check(this.form)">
377
    [% ELSE %]
378
        <input type="button" class="submit" value="Save changes" onclick="return ShowSerialEditingConfirmation(this.form)">
379
        <input type="hidden" name="edit-serial-issue" id="edit-serial-issue" value />
380
    [% END %]
376
    <input type="button" id="addnewitem" value="Add a new item">
381
    <input type="button" id="addnewitem" value="Add a new item">
377
    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a>
382
    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a>
378
    [% END %]</fieldset>
383
    [% END %]</fieldset>
Lines 385-390 Link Here
385
    [%# End fields for fast cataloging %]
390
    [%# End fields for fast cataloging %]
386
391
387
392
393
    [% INCLUDE 'modals/edit_serial_issues.inc' %]
388
    </form>
394
    </form>
389
395
390
    [% INCLUDE 'modals/cataloguing_create_av.inc' %]
396
    [% 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