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 373-379 Link Here
373
    [% IF op != 'add_item' %]
373
    [% IF op != 'add_item' %]
374
        <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
374
        <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
375
    [% END %]
375
    [% END %]
376
    <input type="submit" value="Save changes" onclick="return Check(this.form)">
376
    [% IF Item.HasSerialItem(itemnumber) == 0 %]
377
        <input type="submit" value="Save changes" onclick="return Check(this.form)">
378
    [% ELSE %]
379
        <input type="button" class="submit" value="Save changes" onclick="return ShowSerialEditingConfirmation(this.form)">
380
        <input type="hidden" name="edit-serial-issue" id="edit-serial-issue" value />
381
    [% END %]
377
    <input type="button" id="addnewitem" value="Add a new item">
382
    <input type="button" id="addnewitem" value="Add a new item">
378
    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a>
383
    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a>
379
    [% END %]</fieldset>
384
    [% END %]</fieldset>
Lines 386-391 Link Here
386
    [%# End fields for fast cataloging %]
391
    [%# End fields for fast cataloging %]
387
392
388
393
394
    [% INCLUDE 'modals/edit_serial_issues.inc' %]
389
    </form>
395
    </form>
390
396
391
    [% INCLUDE 'modals/cataloguing_create_av.inc' %]
397
    [% INCLUDE 'modals/cataloguing_create_av.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js (-1 / +17 lines)
Lines 158-163 $(document).ready(function(){ Link Here
158
        return $("#" + $(this).data("item") + "-delete-item-form").submit();
158
        return $("#" + $(this).data("item") + "-delete-item-form").submit();
159
    });
159
    });
160
160
161
    $(document).on('click', '#edit-serial-issues-modal-btn-submit', function(e) {
162
        e.preventDefault();
163
        $('#edit-serial-issues-modal').modal('hide');
164
        $('#edit-serial-issue').val('1');
165
        return $("#f").submit();
166
    });
167
    $(document).on('click', '#no-edit-serial-issues-modal-btn-submit', function(e) {
168
        e.preventDefault();
169
        $('#edit-serial-issues-modal').modal('hide');
170
        return $("#f").submit();
171
    });
172
161
    /* On page load, check for location.hash in the page URL */
173
    /* On page load, check for location.hash in the page URL */
162
    /* If present the location hash will be used to scroll to the relevant anchor */
174
    /* If present the location hash will be used to scroll to the relevant anchor */
163
    var hash = location.hash;
175
    var hash = location.hash;
Lines 235-237 function Dopop(link,i) { Link Here
235
    var defaultvalue=document.forms[0].field_value[i].value;
247
    var defaultvalue=document.forms[0].field_value[i].value;
236
    var newin=window.open(link+"&result=" + defaultvalue,"valuebuilder",'width=500,height=400,toolbar=false,scrollbars=yes');
248
    var newin=window.open(link+"&result=" + defaultvalue,"valuebuilder",'width=500,height=400,toolbar=false,scrollbars=yes');
237
}
249
}
238
- 
250
251
function ShowSerialEditingConfirmation(form) {
252
    $('#edit-serial-issues-modal').modal('show');
253
    return false;
254
}

Return to bug 37116