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

(-)a/admin/smart-rules.pl (+3 lines)
Lines 143-148 elsif ($op eq 'add') { Link Here
143
    $no_auto_renewal_after_hard_limit = output_pref( { dt => $no_auto_renewal_after_hard_limit, dateonly => 1, dateformat => 'iso' } ) if ( $no_auto_renewal_after_hard_limit );
143
    $no_auto_renewal_after_hard_limit = output_pref( { dt => $no_auto_renewal_after_hard_limit, dateonly => 1, dateformat => 'iso' } ) if ( $no_auto_renewal_after_hard_limit );
144
    my $reservesallowed  = $input->param('reservesallowed');
144
    my $reservesallowed  = $input->param('reservesallowed');
145
    my $holds_per_record  = $input->param('holds_per_record');
145
    my $holds_per_record  = $input->param('holds_per_record');
146
    my $holds_per_day = $input->param('holds_per_day');
146
    my $onshelfholds     = $input->param('onshelfholds') || 0;
147
    my $onshelfholds     = $input->param('onshelfholds') || 0;
147
    $maxissueqty =~ s/\s//g;
148
    $maxissueqty =~ s/\s//g;
148
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
149
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
Lines 182-187 elsif ($op eq 'add') { Link Here
182
        no_auto_renewal_after_hard_limit => $no_auto_renewal_after_hard_limit,
183
        no_auto_renewal_after_hard_limit => $no_auto_renewal_after_hard_limit,
183
        reservesallowed               => $reservesallowed,
184
        reservesallowed               => $reservesallowed,
184
        holds_per_record              => $holds_per_record,
185
        holds_per_record              => $holds_per_record,
186
        holds_per_day                 => $holds_per_day,
185
        issuelength                   => $issuelength,
187
        issuelength                   => $issuelength,
186
        lengthunit                    => $lengthunit,
188
        lengthunit                    => $lengthunit,
187
        hardduedate                   => $hardduedate,
189
        hardduedate                   => $hardduedate,
Lines 546-551 my @sorted_branch_cat_rules = sort { $a->{'humancategorycode'} cmp $b->{'humanca Link Here
546
foreach my $entry (@sorted_branch_cat_rules, @sorted_row_loop) {
548
foreach my $entry (@sorted_branch_cat_rules, @sorted_row_loop) {
547
    $entry->{unlimited_maxissueqty} = 1 unless defined($entry->{maxissueqty});
549
    $entry->{unlimited_maxissueqty} = 1 unless defined($entry->{maxissueqty});
548
    $entry->{unlimited_maxonsiteissueqty} = 1 unless defined($entry->{maxonsiteissueqty});
550
    $entry->{unlimited_maxonsiteissueqty} = 1 unless defined($entry->{maxonsiteissueqty});
551
    $entry->{unlimited_holds_per_day} = 1 unless defined($entry->{rules_per_day});
549
}
552
}
550
553
551
@sorted_row_loop = sort by_category_and_itemtype @row_loop;
554
@sorted_row_loop = sort by_category_and_itemtype @row_loop;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-6 / +17 lines)
Lines 87-94 $(document).ready(function() { Link Here
87
                        // Remove potential previous input added
87
                        // Remove potential previous input added
88
                        $(current_column).find("input").remove();
88
                        $(current_column).find("input").remove();
89
                        $(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />");
89
                        $(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />");
90
                    } else if ( i == 3 || i == 4 ) {
90
                    } else if ( i == 3 || i == 4 || i == 23 ) {
91
                        // If the value is not an integer for "Current checkouts allowed" or "Current on-site checkouts allowed"
91
                        // If the value is not an integer for
92
                        //     - "Current checkouts allowed"
93
                        //     - "Current on-site checkouts allowed"
94
                        //     - "Holds allowed (daily)"
92
                        // The value is "Unlimited" (or an equivalent translated string)
95
                        // The value is "Unlimited" (or an equivalent translated string)
93
                        // an it should be set to an empty string
96
                        // an it should be set to an empty string
94
                        if( !((parseFloat(itm) == parseInt(itm)) && !isNaN(itm)) ) {
97
                        if( !((parseFloat(itm) == parseInt(itm)) && !isNaN(itm)) ) {
Lines 188-194 $(document).ready(function() { Link Here
188
                <th>Automatic renewal</th>
191
                <th>Automatic renewal</th>
189
                <th>No automatic renewal after</th>
192
                <th>No automatic renewal after</th>
190
                <th>No automatic renewal after (hard limit)</th>
193
                <th>No automatic renewal after (hard limit)</th>
191
                <th>Holds allowed (count)</th>
194
                <th>Holds allowed (total)</th>
195
                <th>Holds allowed (daily)</th>
192
                <th>Holds per record (count)</th>
196
                <th>Holds per record (count)</th>
193
                <th>On shelf holds allowed</th>
197
                <th>On shelf holds allowed</th>
194
                <th>Item level holds</th>
198
                <th>Item level holds</th>
Lines 276-281 $(document).ready(function() { Link Here
276
                            <td>[% rule.no_auto_renewal_after %]</td>
280
                            <td>[% rule.no_auto_renewal_after %]</td>
277
                            <td>[% rule.no_auto_renewal_after_hard_limit %]</td>
281
                            <td>[% rule.no_auto_renewal_after_hard_limit %]</td>
278
							<td>[% rule.reservesallowed %]</td>
282
							<td>[% rule.reservesallowed %]</td>
283
                            <td>[% IF rule.unlimited_holds_per_day %]
284
                                    Unlimited
285
                                [% ELSE %]
286
                                    [% rule.holds_per_day %]
287
                                [% END %]
288
                            </td>
279
                                                        <td>[% rule.holds_per_record %]</td>
289
                                                        <td>[% rule.holds_per_record %]</td>
280
                                                        <td>
290
                                                        <td>
281
                                                            [% IF rule.onshelfholds == 1 %]
291
                                                            [% IF rule.onshelfholds == 1 %]
Lines 373-378 $(document).ready(function() { Link Here
373
                        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
383
                        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
374
                    </td>
384
                    </td>
375
                    <td><input type="text" name="reservesallowed" id="reservesallowed" size="2" /></td>
385
                    <td><input type="text" name="reservesallowed" id="reservesallowed" size="2" /></td>
386
                    <td><input type="text" name="holds_per_day" id="holds_per_day" size="2" /></td>
376
                    <td><input type="text" name="holds_per_record" id="holds_per_record" size="2" /></td>
387
                    <td><input type="text" name="holds_per_record" id="holds_per_record" size="2" /></td>
377
                    <td>
388
                    <td>
378
                        <select name="onshelfholds" id="onshelfholds">
389
                        <select name="onshelfholds" id="onshelfholds">
Lines 426-433 $(document).ready(function() { Link Here
426
                      <th>No renewal before</th>
437
                      <th>No renewal before</th>
427
                      <th>Automatic renewal</th>
438
                      <th>Automatic renewal</th>
428
                      <th>No automatic renewal after</th>
439
                      <th>No automatic renewal after</th>
429
                       <th>No automatic renewal after (hard limit)</th>
440
                      <th>No automatic renewal after (hard limit)</th>
430
                      <th>Holds allowed (count)</th>
441
                      <th>Holds allowed (total)</th>
442
                      <th>Holds allowed (daily)</th>
431
                      <th>Holds per record (count)</th>
443
                      <th>Holds per record (count)</th>
432
                      <th>On shelf holds allowed</th>
444
                      <th>On shelf holds allowed</th>
433
                      <th>Item level holds</th>
445
                      <th>Item level holds</th>
434
- 

Return to bug 15486