diff --git a/admin/categories.pl b/admin/categories.pl
index 6093583888..04b5e5cc02 100755
--- a/admin/categories.pl
+++ b/admin/categories.pl
@@ -79,6 +79,7 @@ if ( $op eq 'add_form' ) {
my $noissuescharge = $input->param('noissuescharge') || undef;
my $noissueschargeguarantees = $input->param('noissueschargeguarantees') || undef;
my $noissueschargeguarantorswithguarantees = $input->param('noissueschargeguarantorswithguarantees') || undef;
+ my $enforce_expiry_notice = $input->param('enforce_expiry_notice');
my @branches = grep { $_ ne q{} } $input->multi_param('branches');
my $can_be_guarantee = $input->param('can_be_guarantee');
@@ -120,6 +121,7 @@ if ( $op eq 'add_form' ) {
$category->noissueschargeguarantees($noissueschargeguarantees);
$category->noissueschargeguarantorswithguarantees($noissueschargeguarantorswithguarantees);
$category->force_password_reset_when_set_by_staff($force_password_reset_when_set_by_staff);
+ $category->enforce_expiry_notice($enforce_expiry_notice);
eval {
$category->store;
$category->replace_library_limits( \@branches );
@@ -157,6 +159,7 @@ if ( $op eq 'add_form' ) {
noissuescharge => $noissuescharge,
noissueschargeguarantees => $noissueschargeguarantees,
noissueschargeguarantorswithguarantees => $noissueschargeguarantorswithguarantees,
+ enforce_expiry_notice => $enforce_expiry_notice,
force_password_reset_when_set_by_staff => $force_password_reset_when_set_by_staff,
}
);
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
index 0f6eeca4fe..6737f1266d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
@@ -22,6 +22,7 @@
[% FOREACH messaging_preference IN messaging_preferences %]
[% NEXT IF !Koha.Preference( 'ILLModule' ) && messaging_preference.message_name.match('^Ill_') %]
[% NEXT IF !Koha.Preference('MembershipExpiryDaysNotice') && messaging_preference.Patron_Expiry %]
+ [% NEXT IF messaging_preference.Patron_Expiry && (category.enforce_expiry_notice || patron.category.enforce_expiry_notice) %]
[% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
[% NEXT IF !Koha.Preference('UseRecalls') && messaging_preference.message_name.match('^Recall_') %]
@@ -43,7 +44,7 @@
Item checkout
[% END %]
[% ELSIF ( messaging_preference.Patron_Expiry ) %]
- Patron account expiry
+ Patron expiry
[% ELSIF ( messaging_preference.Ill_ready ) %]
Interlibrary loan ready
[% ELSIF ( messaging_preference.Ill_unavailable ) %]
@@ -62,15 +63,27 @@
[% IF ( messaging_preference.takes_days ) %]
|
-
+ [% ELSE %]
+
+ [% FOREACH select_day IN messaging_preference.select_days %]
+ [% IF ( select_day.selected ) %]
+
+ [% ELSE %]
+
+ [% END %]
+ [% END %]
+
+ [% END %]
|
[% ELSE %]
- |
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt
index a8a7adde0a..fe51cdb85f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt
@@ -508,6 +508,19 @@
[%- SET pref_NoIssuesChargeGuarantorsWithGuarantees_link = 'NoIssuesChargeGuarantees' -%]
If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantorsWithGuarantees_link | $raw | $KohaSpan -%] preference.
+
+
+
+ [% IF category.enforce_expiry_notice %]
+
+
+ [% ELSE %]
+
+
+ [% END %]
+
+ Make the expiry notice mandatory for all patrons in this category and prevent patrons from opting out in the messaging preferences
+
@@ -656,6 +669,7 @@
Checkout charge limit |
Guarantees checkout charge limit |
Guarantors with guarantees checkout charge limit |
+ Enforce patron expiry notice |
Actions |
@@ -831,6 +845,7 @@
[% ELSE %]
[% 0.00 | $Price %] |
[% END %]
+ [% IF category.enforce_expiry_notice %]Yes[% ELSE %]No[% END %] |
Edit
Delete
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
index 6c4c4db1c6..4c092e4e40 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
@@ -68,6 +68,7 @@
[% FOREACH messaging_preference IN messaging_preferences %]
[% NEXT IF !Koha.Preference( 'ILLModule' ) && messaging_preference.message_name.match('^Ill_') %]
[% NEXT IF !Koha.Preference('MembershipExpiryDaysNotice') && messaging_preference.Patron_Expiry %]
+ [% NEXT IF messaging_preference.Patron_Expiry && enforce_expiry_notice %]
[% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
[% NEXT IF !Koha.Preference('UseRecalls') && messaging_preference.message_name.match('^Recall_') %]
|
diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl
index 66f070c677..399451790a 100755
--- a/opac/opac-messaging.pl
+++ b/opac/opac-messaging.pl
@@ -84,6 +84,7 @@ $template->param(
SMSnumber => $patron->smsalertnumber, # FIXME This is already sent 2 lines above
SMSSendDriver => C4::Context->preference("SMSSendDriver"),
TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification"),
+ enforce_expiry_notice => $patron->category->enforce_expiry_notice,
);
if ( $opac_messaging && C4::Context->preference("SMSSendDriver") eq 'Email' ) {