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

(-)a/admin/categories.pl (-1 / +4 lines)
Lines 78-85 elsif ( $op eq 'cud-add_validate' ) { Link Here
78
    my $min_password_length                    = $input->param('min_password_length');
78
    my $min_password_length                    = $input->param('min_password_length');
79
    my $require_strong_password                = $input->param('require_strong_password');
79
    my $require_strong_password                = $input->param('require_strong_password');
80
    my $noissuescharge                         = $input->param('noissuescharge') || undef;
80
    my $noissuescharge                         = $input->param('noissuescharge') || undef;
81
    my $noissueschargeguarantees               = $input->param('noissueschargeguarantees') || undef;
81
    my $noissueschargeguarantees               = $input->param('noissueschargeguarantees')               || undef;
82
    my $noissueschargeguarantorswithguarantees = $input->param('noissueschargeguarantorswithguarantees') || undef;
82
    my $noissueschargeguarantorswithguarantees = $input->param('noissueschargeguarantorswithguarantees') || undef;
83
    my $enforce_expiry_notice                  = $input->param('enforce_expiry_notice');
83
84
84
    my @branches = grep { $_ ne q{} } $input->multi_param('branches');
85
    my @branches = grep { $_ ne q{} } $input->multi_param('branches');
85
    my $can_be_guarantee = $input->param('can_be_guarantee');
86
    my $can_be_guarantee = $input->param('can_be_guarantee');
Lines 121-126 elsif ( $op eq 'cud-add_validate' ) { Link Here
121
        $category->noissueschargeguarantees($noissueschargeguarantees);
122
        $category->noissueschargeguarantees($noissueschargeguarantees);
122
        $category->noissueschargeguarantorswithguarantees($noissueschargeguarantorswithguarantees);
123
        $category->noissueschargeguarantorswithguarantees($noissueschargeguarantorswithguarantees);
123
        $category->force_password_reset_when_set_by_staff($force_password_reset_when_set_by_staff);
124
        $category->force_password_reset_when_set_by_staff($force_password_reset_when_set_by_staff);
125
        $category->enforce_expiry_notice($enforce_expiry_notice);
124
        eval {
126
        eval {
125
            $category->store;
127
            $category->store;
126
            $category->replace_library_limits( \@branches );
128
            $category->replace_library_limits( \@branches );
Lines 158-163 elsif ( $op eq 'cud-add_validate' ) { Link Here
158
                noissuescharge                         => $noissuescharge,
160
                noissuescharge                         => $noissuescharge,
159
                noissueschargeguarantees               => $noissueschargeguarantees,
161
                noissueschargeguarantees               => $noissueschargeguarantees,
160
                noissueschargeguarantorswithguarantees => $noissueschargeguarantorswithguarantees,
162
                noissueschargeguarantorswithguarantees => $noissueschargeguarantorswithguarantees,
163
                enforce_expiry_notice                  => $enforce_expiry_notice,
161
                force_password_reset_when_set_by_staff => $force_password_reset_when_set_by_staff,
164
                force_password_reset_when_set_by_staff => $force_password_reset_when_set_by_staff,
162
            }
165
            }
163
        );
166
        );
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc (+1 lines)
Lines 18-23 Link Here
18
    [% FOREACH messaging_preference IN messaging_preferences %]
18
    [% FOREACH messaging_preference IN messaging_preferences %]
19
    [% NEXT IF !Koha.Preference( 'ILLModule' ) && messaging_preference.message_name.match('^Ill_') %]
19
    [% NEXT IF !Koha.Preference( 'ILLModule' ) && messaging_preference.message_name.match('^Ill_') %]
20
    [% NEXT IF !Koha.Preference('MembershipExpiryDaysNotice') && messaging_preference.Patron_Expiry %]
20
    [% NEXT IF !Koha.Preference('MembershipExpiryDaysNotice') && messaging_preference.Patron_Expiry %]
21
    [% NEXT IF messaging_preference.Patron_Expiry && (category.enforce_expiry_notice || patron.category.enforce_expiry_notice) %]
21
    [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
22
    [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
22
    [% NEXT IF !Koha.Preference('UseRecalls') && messaging_preference.message_name.match('^Recall_') %]
23
    [% NEXT IF !Koha.Preference('UseRecalls') && messaging_preference.message_name.match('^Recall_') %]
23
    <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
24
    <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt (+15 lines)
Lines 495-500 Link Here
495
                    <input type="text" pattern="^\d+(\.\d{2})?$" name="noissueschargeguarantorswithguarantees" id="noissueschargeguarantorswithguarantees" value="[% category.noissueschargeguarantorswithguarantees | $Price on_editing => 1 %]" class="decimal" size="3" maxlength="4" />
495
                    <input type="text" pattern="^\d+(\.\d{2})?$" name="noissueschargeguarantorswithguarantees" id="noissueschargeguarantorswithguarantees" value="[% category.noissueschargeguarantorswithguarantees | $Price on_editing => 1 %]" class="decimal" size="3" maxlength="4" />
496
                    <div class="hint">If set, this will override the global value set in the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noissuescharge&ok=Search">NoIssuesChargeGuarantorsWithGuarantees</a> preference</div>
496
                    <div class="hint">If set, this will override the global value set in the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noissuescharge&ok=Search">NoIssuesChargeGuarantorsWithGuarantees</a> preference</div>
497
                </li>
497
                </li>
498
                <li>
499
                    <label for="enforce_expiry_notice">Enforce patron expiry notice:</label>
500
                    <select name="enforce_expiry_notice" id="enforce_expiry_notice">
501
                        [% IF category.enforce_expiry_notice %]
502
                            <option value="1" selected>Yes</option>
503
                            <option value="0">No</option>
504
                        [% ELSE %]
505
                            <option value="1">Yes</option>
506
                            <option value="0" selected>No</option>
507
                        [% END %]
508
                    <select>
509
                    <div class="hint">Make the expiry notice mandatory for all patrons in this category and prevent patrons from opting out in the messaging preferences</div>
510
                </li>
498
            </ol>
511
            </ol>
499
        </fieldset>
512
        </fieldset>
500
513
Lines 643-648 Link Here
643
                    <th scope="col" data-colname="checkout_charge_limit">Checkout charge limit</th>
656
                    <th scope="col" data-colname="checkout_charge_limit">Checkout charge limit</th>
644
                    <th scope="col" data-colname="guarantees_checkout_charge_limit">Guarantees checkout charge limit</th>
657
                    <th scope="col" data-colname="guarantees_checkout_charge_limit">Guarantees checkout charge limit</th>
645
                    <th scope="col" data-colname="guarantors_checkout_charge_limit">Guarantors with guarantees checkout charge limit</th>
658
                    <th scope="col" data-colname="guarantors_checkout_charge_limit">Guarantors with guarantees checkout charge limit</th>
659
                    <th scope="col" data-colname="enforce_expiry_notice">Enforce patron expiry notice</th>
646
                    <th scope="col" data-colname="actions">Actions</th>
660
                    <th scope="col" data-colname="actions">Actions</th>
647
                </tr>
661
                </tr>
648
            </thead>
662
            </thead>
Lines 796-801 Link Here
796
                        [% ELSE %]
810
                        [% ELSE %]
797
                            <td>[% 0.00 | $Price %]</td>
811
                            <td>[% 0.00 | $Price %]</td>
798
                        [% END %]
812
                        [% END %]
813
                        <td>[% IF category.enforce_expiry_notice %] Yes [% ELSE %] No [% END %]</td>
799
                        <td class="actions">
814
                        <td class="actions">
800
                            <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=add_form&amp;categorycode=[% category.categorycode |uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
815
                            <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=add_form&amp;categorycode=[% category.categorycode |uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
801
                            <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=delete_confirm&amp;categorycode=[% category.categorycode |uri %]"><i class="fa fa-trash-can"></i> Delete</a>
816
                            <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=delete_confirm&amp;categorycode=[% category.categorycode |uri %]"><i class="fa fa-trash-can"></i> Delete</a>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (+1 lines)
Lines 60-65 Link Here
60
                                    [% FOREACH messaging_preference IN messaging_preferences %]
60
                                    [% FOREACH messaging_preference IN messaging_preferences %]
61
                                        [% NEXT IF !Koha.Preference( 'ILLModule' ) && messaging_preference.message_name.match('^Ill_') %]
61
                                        [% NEXT IF !Koha.Preference( 'ILLModule' ) && messaging_preference.message_name.match('^Ill_') %]
62
                                        [% NEXT IF !Koha.Preference('MembershipExpiryDaysNotice') && messaging_preference.Patron_Expiry %]
62
                                        [% NEXT IF !Koha.Preference('MembershipExpiryDaysNotice') && messaging_preference.Patron_Expiry %]
63
                                        [% NEXT IF messaging_preference.Patron_Expiry && enforce_expiry_notice %]
63
                                        [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
64
                                        [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
64
                                        [% NEXT IF !Koha.Preference('UseRecalls') && messaging_preference.message_name.match('^Recall_') %]
65
                                        [% NEXT IF !Koha.Preference('UseRecalls') && messaging_preference.message_name.match('^Recall_') %]
65
                                        <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
66
                                        <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
(-)a/opac/opac-messaging.pl (-1 / +1 lines)
Lines 77-82 $template->param( Link Here
77
    SMSnumber             => $patron->smsalertnumber, # FIXME This is already sent 2 lines above
77
    SMSnumber             => $patron->smsalertnumber, # FIXME This is already sent 2 lines above
78
    SMSSendDriver         => C4::Context->preference("SMSSendDriver"),
78
    SMSSendDriver         => C4::Context->preference("SMSSendDriver"),
79
    TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification"),
79
    TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification"),
80
    enforce_expiry_notice => $patron->category->enforce_expiry_notice,
80
);
81
);
81
82
82
if( $opac_messaging && C4::Context->preference("SMSSendDriver") eq 'Email' ) {
83
if( $opac_messaging && C4::Context->preference("SMSSendDriver") eq 'Email' ) {
83
- 

Return to bug 30301