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

(-)a/C4/Serials.pm (-2 / +2 lines)
Lines 834-840 sub GetNextSeq { Link Here
834
834
835
    my ( $newlastvalue1, $newlastvalue2, $newlastvalue3,
835
    my ( $newlastvalue1, $newlastvalue2, $newlastvalue3,
836
    $newinnerloop1, $newinnerloop2, $newinnerloop3 );
836
    $newinnerloop1, $newinnerloop2, $newinnerloop3 );
837
    my $count = $count_forward ? $count_forward : 1;
837
    my $count = $count_forward || 1;
838
838
839
    if ($subscription->{'skip_serialseq'}) {
839
    if ($subscription->{'skip_serialseq'}) {
840
        my @irreg = split /;/, $subscription->{'irregularity'};
840
        my @irreg = split /;/, $subscription->{'irregularity'};
Lines 1072-1078 sub ModSerialStatus { Link Here
1072
1072
1073
    return unless ($serialid);
1073
    return unless ($serialid);
1074
1074
1075
    my $count = $count_forward ? $count_forward : 1;
1075
    my $count = $count_forward || 1;
1076
1076
1077
    #It is a usual serial
1077
    #It is a usual serial
1078
    # 1st, get previous status :
1078
    # 1st, get previous status :
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/serials_skip_issues.inc (-2 / +2 lines)
Lines 9-20 Link Here
9
                        <ol>
9
                        <ol>
10
                            <li>
10
                            <li>
11
                            <label for="nbissues" class="required">How many issues do you want to skip?</label>
11
                            <label for="nbissues" class="required">How many issues do you want to skip?</label>
12
                            <input type="text" pattern="^\d+$" size="10" id="skip_issues" name="skip_issues" required="required" />
12
                            <input type="text" pattern="^\d$" size="10" id="skip_issues" name="skip_issues" required="required" />
13
                            </li>
13
                            </li>
14
                        </ol>
14
                        </ol>
15
                        <input type="hidden" name="op" value="cud-gennext" />
15
                        <input type="hidden" name="op" value="cud-gennext" />
16
16
17
                        [%# subscriptionidlist is used from serials-collection, subscriptionid is used from serils-edit %]
17
                        [%# subscriptionidlist is used from serials-collection, subscriptionid is used from serials-edit %]
18
                        <input type="hidden" name="subscriptionid" value="[% subscriptionidlist || subscriptionid | html %]" />
18
                        <input type="hidden" name="subscriptionid" value="[% subscriptionidlist || subscriptionid | html %]" />
19
                    </fieldset>
19
                    </fieldset>
20
                </div>
20
                </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt (-21 / +1 lines)
Lines 12-37 Link Here
12
        $('#multi_receiving').on('show', function () {
12
        $('#multi_receiving').on('show', function () {
13
           $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML);
13
           $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML);
14
        });
14
        });
15
16
        $("form").on("submit", function(){
17
                let issues = $('input[name="skip_issues"]').val() ? $('input[name="skip_issues"]').val() : '';
18
                let too_many = _("Choose a value between 0-10 in issues to skip!");
19
                let no_number = _("Not a number in skip issues!");
20
21
                if ( issues == '' || ( issues.match(/^\d+$/) && issues <= 10 )  ) {
22
                    return true;
23
                }
24
                else if ( issues.match(/^\d+$/) && issues > 10  ) {
25
                    alert(too_many);
26
                    return false;
27
                }  else if ( !issues.match(/^\d+$/) ) {
28
                    alert(no_number);
29
                    return false;
30
                }
31
                else {
32
                    return false;
33
                }
34
            });
35
    });
15
    });
36
16
37
function popup(subscriptionid) {
17
function popup(subscriptionid) {
Lines 356-362 $(document).ready(function() { Link Here
356
  [% END %]
336
  [% END %]
357
[% END %]
337
[% END %]
358
    <tr>
338
    <tr>
359
        <td colspan="6">Skip issues:<input type="checkbox" id="toggle_skip_issues"> <input id="skip_issues" type="text" pattern="^\d+$" name="skip_issues" class="collapse" value="1" disabled required="required"/></td>
339
        <td colspan="6">Skip issues:<input type="checkbox" id="toggle_skip_issues"> <input id="skip_issues" type="text" pattern="^\d$" name="skip_issues" class="collapse" value="1" disabled required="required"/></td>
360
    </tr>
340
    </tr>
361
[% FOREACH newserialloo IN newserialloop %]
341
[% FOREACH newserialloo IN newserialloop %]
362
    [% UNLESS ( newserialloo.subscriptionexpired ) %]
342
    [% UNLESS ( newserialloo.subscriptionexpired ) %]
(-)a/serials/serials-collection.pl (-2 / +1 lines)
Lines 47-53 my ($template, $loggedinuser, $cookie) Link Here
47
my $biblionumber = $query->param('biblionumber');
47
my $biblionumber = $query->param('biblionumber');
48
my @subscriptionid = $query->multi_param('subscriptionid');
48
my @subscriptionid = $query->multi_param('subscriptionid');
49
my $skip_issues = $query->param('skip_issues') || 0;
49
my $skip_issues = $query->param('skip_issues') || 0;
50
my $count_forward = int $skip_issues + 1;
50
my $count_forward = $skip_issues + 1;
51
51
52
@subscriptionid= uniq @subscriptionid;
52
@subscriptionid= uniq @subscriptionid;
53
@subscriptionid= sort @subscriptionid;
53
@subscriptionid= sort @subscriptionid;
54
- 

Return to bug 32392