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

(-)a/cataloguing/additem.pl (+6 lines)
Lines 624-629 if ($op eq "cud-additem") { Link Here
624
        $item->store;
624
        $item->store;
625
    }
625
    }
626
626
627
    if ( $input->param('edit-serial-issue') ) {
628
        my $serialid = $item->serial_item->serialid;
629
        print $input->redirect("/cgi-bin/koha/serials/serials-edit.pl?serialid=$serialid");
630
        exit;
631
    }
632
627
    $nextop="cud-additem";
633
    $nextop="cud-additem";
628
} elsif ($op eq "delinkitem"){
634
} elsif ($op eq "delinkitem"){
629
635
(-)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 359-365 Link Here
359
    [% IF op != 'add_item' %]
359
    [% IF op != 'add_item' %]
360
        <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
360
        <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
361
    [% END %]
361
    [% END %]
362
    <input type="submit" value="Save changes" onclick="return Check(this.form)">
362
    [% IF Item.HasSerialItem(itemnumber) == 0 %]
363
        <input type="submit" value="Save changes" onclick="return Check(this.form)">
364
    [% ELSE %]
365
        <input type="button" class="submit" value="Save changes" onclick="return ShowSerialEditingConfirmation(this.form)">
366
        <input type="hidden" name="edit-serial-issue" id="edit-serial-issue" value />
367
    [% END %]
363
    <input type="button" id="addnewitem" value="Add a new item">
368
    <input type="button" id="addnewitem" value="Add a new item">
364
    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a>
369
    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Cancel</a>
365
    [% END %]</fieldset>
370
    [% END %]</fieldset>
Lines 372-377 Link Here
372
    [%# End fields for fast cataloging %]
377
    [%# End fields for fast cataloging %]
373
378
374
379
380
    [% INCLUDE 'modals/edit_serial_issues.inc' %]
375
    </form>
381
    </form>
376
382
377
    [% INCLUDE 'modals/cataloguing_create_av.inc' %]
383
    [% 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