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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +4 lines)
Lines 565-572 Link Here
565
                                                        <div id="set-automatic-renewal" class="circ-setting">
565
                                                        <div id="set-automatic-renewal" class="circ-setting">
566
                                                            [% IF NEEDSCONFIRMATION %]
566
                                                            [% IF NEEDSCONFIRMATION %]
567
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
567
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
568
                                                            [% ELSE %]
568
                                                            [% ELSIF patron.autorenewal %]
569
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
569
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
570
                                                            [% ELSE %]
571
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
572
                                                                title="Patron has opted out of auto-renewal"/>
570
                                                            [% END %]
573
                                                            [% END %]
571
574
572
                                                            <label for="auto_renew">Automatic renewal</label>
575
                                                            <label for="auto_renew">Automatic renewal</label>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (+26 lines)
Lines 711-716 Link Here
711
    [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
711
    [% PROCESS 'av-build-dropbox.inc' name="sort2", category="Bsort2", default=sort2, size = 20 %]
712
    [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
712
    [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
713
    </li>
713
    </li>
714
    [% UNLESS noautorenewal %]
715
        <li class="radio">
716
            <label for="yes-autorenewal">
717
                Allow auto-renewal of items:
718
            </label>
719
                [% IF ( autorenewal ) %]
720
                    <label for="yes-autorenewal">
721
                        Yes
722
                        <input type="radio" id="yes-autorenewal" name="autorenewal" value="1" checked="checked" />
723
                    </label>
724
                    <label for="no-autorenewal">
725
                        No
726
                        <input type="radio" id="no-autorenewal" name="autorenewal" value="0" />
727
                    </label>
728
                [% ELSE %]
729
                    <label for="yes-autorenewal">
730
                        Yes
731
                        <input type="radio" id="yes-autorenewal" name="autorenewal" value="1" />
732
                    </label>
733
                    <label for="no-autorenewal">
734
                        No
735
                        <input type="radio" id="no-autorenewal" name="autorenewal" value="0" checked="checked" />
736
                    </label>
737
                [% END %]
738
        </li>
739
    [% END %]
714
        [% END %]
740
        [% END %]
715
    [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
741
    [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
716
      <li><label for="checkprevcheckout">Check for previous checkouts: </label>
742
      <li><label for="checkprevcheckout">Check for previous checkouts: </label>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt (+1 lines)
Lines 52-57 Link Here
52
[% CASE 'contacttitle'        %]<span>Contact: Title</span>
52
[% CASE 'contacttitle'        %]<span>Contact: Title</span>
53
[% CASE 'relationship'        %]<span>Contact: Relationship</span>
53
[% CASE 'relationship'        %]<span>Contact: Relationship</span>
54
[% CASE 'sex'                 %]<span>Gender</span>
54
[% CASE 'sex'                 %]<span>Gender</span>
55
[% CASE 'autorenewal'         %]<span>Auto-renewal</span>
55
[% CASE 'altcontactfirstname' %]<span>Alternate contact: First name</span>
56
[% CASE 'altcontactfirstname' %]<span>Alternate contact: First name</span>
56
[% CASE 'altcontactsurname'   %]<span>Alternate contact: Surname</span>
57
[% CASE 'altcontactsurname'   %]<span>Alternate contact: Surname</span>
57
[% CASE 'altcontactaddress1'  %]<span>Alternate contact: Address</span>
58
[% CASE 'altcontactaddress1'  %]<span>Alternate contact: Address</span>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt (+1 lines)
Lines 84-89 Link Here
84
            <li><span class="label">Library: </span>[% patron.library.branchname | html %]</li>
84
            <li><span class="label">Library: </span>[% patron.library.branchname | html %]</li>
85
            [% IF ( patron.sort1 ) %]<li><span class="label">Sort field 1:</span>[% AuthorisedValues.GetByCode('Bsort1', patron.sort1) | html %]</li>[% END %]
85
            [% IF ( patron.sort1 ) %]<li><span class="label">Sort field 1:</span>[% AuthorisedValues.GetByCode('Bsort1', patron.sort1) | html %]</li>[% END %]
86
            [% IF ( patron.sort2 ) %]<li><span class="label">Sort field 2:</span>[% AuthorisedValues.GetByCode('Bsort2', patron.sort2) | html %]</li>[% END %]
86
            [% IF ( patron.sort2 ) %]<li><span class="label">Sort field 2:</span>[% AuthorisedValues.GetByCode('Bsort2', patron.sort2) | html %]</li>[% END %]
87
            [% UNLESS ( patron.autorenewal ) %]<li>Auto renewal: Patron has opted out</li>[% END %]
87
        </ol>
88
        </ol>
88
    </div>
89
    </div>
89
    </div>
90
    </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (+6 lines)
Lines 516-521 Link Here
516
                                                [% AuthorisedValues.GetByCode('Bsort2', patron.sort2) | html %]
516
                                                [% AuthorisedValues.GetByCode('Bsort2', patron.sort2) | html %]
517
                                            </li>
517
                                            </li>
518
                                        [% END %]
518
                                        [% END %]
519
                                        [% UNLESS ( patron.autorenewal ) %]
520
                                            <li id="patron-autorenewal">
521
                                                <span class="label">Auto renewal:</span>
522
                                                Patron has opted out
523
                                            </li>
524
                                        [% END %]
519
                                        <li id="patron-username">
525
                                        <li id="patron-username">
520
                                            <span class="label">Username: </span>
526
                                            <span class="label">Username: </span>
521
                                            [% patron.userid | html %]
527
                                            [% patron.userid | html %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt (+27 lines)
Lines 258-263 Link Here
258
                                        [% END %]
258
                                        [% END %]
259
                                    </li>
259
                                    </li>
260
                                [% END %]
260
                                [% END %]
261
                                [% UNLESS hidden.defined('autorenewal') %]
262
                                    <li class="lradio">
263
                                        <label for="yes-autorenewal">
264
                                            Allow auto-renewal:
265
                                        </label>
266
                                            [% IF ( borrower.autorenewal ) %]
267
                                                <label class="radio inline" for="yes-autorenewal">
268
                                                    Yes
269
                                                    <input type="radio" id="yes-autorenewal" name="borrower_autorenewal" value="1" checked="checked" />
270
                                                </label>
271
272
                                                <label class="radio inline" for="no-autorenewal">
273
                                                    No
274
                                                    <input type="radio" id="no-autorenewal" name="borrower_autorenewal" value="0" />
275
                                                </label>
276
                                            [% ELSE %]
277
                                                <label class="radio inline" for="yes-autorenewal">
278
                                                    Yes
279
                                                    <input type="radio" id="yes-autorenewal" name="borrower_autorenewal" value="1" />
280
                                                </label>
281
                                                <label class="radio inline" for="no-autorenewal">
282
                                                    No
283
                                                    <input type="radio" id="no-autorenewal" name="borrower_autorenewal" value="0" checked="checked" />
284
                                                </label>
285
                                            [% END %]
286
                                    </li>
287
                                [% END %]
261
                            </ol>
288
                            </ol>
262
                        </fieldset>
289
                        </fieldset>
263
                [% END # / defined 'branchcode' %]
290
                [% END # / defined 'branchcode' %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-3 / +3 lines)
Lines 324-335 Link Here
324
                                                    [% ELSIF ISSUE.auto_account_expired %]
324
                                                    [% ELSIF ISSUE.auto_account_expired %]
325
                                                        Automatic renewal failed, your account is expired.
325
                                                        Automatic renewal failed, your account is expired.
326
                                                        <span class="renewals">([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining)</span>
326
                                                        <span class="renewals">([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining)</span>
327
                                                    [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
328
                                                        Automatic renewal
329
                                                        <span class="renewals">([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining)</span>
330
                                                    [% ELSIF ( ISSUE.too_soon ) %]
327
                                                    [% ELSIF ( ISSUE.too_soon ) %]
331
                                                        No renewal before [% ISSUE.soonestrenewdate | html %]
328
                                                        No renewal before [% ISSUE.soonestrenewdate | html %]
332
                                                        <span class="renewals">([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining)</span>
329
                                                        <span class="renewals">([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining)</span>
330
                                                    [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
331
                                                        Automatic renewal
332
                                                        <span class="renewals">([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining)</span>
333
                                                    [% ELSIF ( ISSUE.item_denied_renewal ) %]
333
                                                    [% ELSIF ( ISSUE.item_denied_renewal ) %]
334
                                                        Renewal not allowed
334
                                                        Renewal not allowed
335
                                                    [% END %]
335
                                                    [% END %]
(-)a/members/memberentry.pl (+1 lines)
Lines 725-730 $template->param(no_add => $no_add); Link Here
725
725
726
$template->param( sort1 => $data{'sort1'});
726
$template->param( sort1 => $data{'sort1'});
727
$template->param( sort2 => $data{'sort2'});
727
$template->param( sort2 => $data{'sort2'});
728
$template->param( autorenew => $data{'autorenew'});
728
729
729
if ($nok) {
730
if ($nok) {
730
    foreach my $error (@errors) {
731
    foreach my $error (@errors) {
(-)a/misc/cronjobs/automatic_renewals.pl (-2 / +1 lines)
Lines 70-76 GetOptions( Link Here
70
pod2usage(0) if $help;
70
pod2usage(0) if $help;
71
cronlogaction();
71
cronlogaction();
72
72
73
my $auto_renews = Koha::Checkouts->search({ auto_renew => 1 });
73
my $auto_renews = Koha::Checkouts->search({ auto_renew => 1, 'borrower.autorenewal' => 1 },{ join => 'borrower'});
74
74
75
my %report;
75
my %report;
76
while ( my $auto_renew = $auto_renews->next ) {
76
while ( my $auto_renew = $auto_renews->next ) {
77
- 

Return to bug 24476