Bugzilla – Attachment 182154 Details for
Bug 30301
Add an option to specify the patron expiration notices as mandatory by patron category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30301: Update templates
Bug-30301-Update-templates.patch (text/plain), 11.34 KB, created by
Matt Blenkinsop
on 2025-05-09 07:40:40 UTC
(
hide
)
Description:
Bug 30301: Update templates
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-05-09 07:40:40 UTC
Size:
11.34 KB
patch
obsolete
>From 83c02cebfcdc22d4b5f411268ff7bedcbf8f601f Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Tue, 3 Dec 2024 16:51:14 +0000 >Subject: [PATCH] Bug 30301: Update templates > >Signed-off-by: Hanna Leiker <tech.hanna@salinapublic.org> >--- > admin/categories.pl | 3 ++ > .../en/includes/messaging-preference-form.inc | 31 +++++++++++++------ > .../prog/en/modules/admin/categories.tt | 15 +++++++++ > .../bootstrap/en/modules/opac-messaging.tt | 1 + > opac/opac-messaging.pl | 1 + > 5 files changed, 42 insertions(+), 9 deletions(-) > >diff --git a/admin/categories.pl b/admin/categories.pl >index 60935838880..04b5e5cc024 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 0f6eeca4fe2..6737f1266de 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_') %] > <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]"> >@@ -43,7 +44,7 @@ > <span>Item checkout</span> > [% END %] > [% ELSIF ( messaging_preference.Patron_Expiry ) %] >- <span>Patron account expiry</span> >+ <span>Patron expiry</span> > [% ELSIF ( messaging_preference.Ill_ready ) %] > <span>Interlibrary loan ready</span> > [% ELSIF ( messaging_preference.Ill_unavailable ) %] >@@ -62,15 +63,27 @@ > </td> > [% IF ( messaging_preference.takes_days ) %] > <td> >- <select name="[% messaging_preference.message_attribute_id | html %]-DAYS" [% IF messaging_form_inactive %]disabled="disabled"[% END %]> >- [% FOREACH select_day IN messaging_preference.select_days %] >- [% IF ( select_day.selected ) %] >- <option value="[% select_day.day | html %]" selected="selected">[% select_day.day | html %]</option> >- [% ELSE %] >- <option value="[% select_day.day | html %]">[% select_day.day | html %]</option> >+ [% IF ( messaging_form_inactive ) %] >+ <select name="[% messaging_preference.message_attribute_id | html %]-DAYS" disabled="disabled"> >+ [% FOREACH select_day IN messaging_preference.select_days %] >+ [% IF ( select_day.selected ) %] >+ <option value="[% select_day.day | html %]" selected="selected">[% select_day.day | html %]</option> >+ [% ELSE %] >+ <option value="[% select_day.day | html %]">[% select_day.day | html %]</option> >+ [% END %] > [% END %] >- [% END %] >- </select> >+ </select> >+ [% ELSE %] >+ <select name="[% messaging_preference.message_attribute_id | html %]-DAYS"> >+ [% FOREACH select_day IN messaging_preference.select_days %] >+ [% IF ( select_day.selected ) %] >+ <option value="[% select_day.day | html %]" selected="selected">[% select_day.day | html %]</option> >+ [% ELSE %] >+ <option value="[% select_day.day | html %]">[% select_day.day | html %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ [% END %] > </td> > [% ELSE %] > <td>-</td> >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 5a699162d4d..a08d52e3243 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >@@ -509,6 +509,19 @@ > [%- SET pref_NoIssuesChargeGuarantorsWithGuarantees_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=NoIssuesChargeGuarantees&ok=Search">NoIssuesChargeGuarantees</a>' -%] > <div class="hint">If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantorsWithGuarantees_link | $raw | $KohaSpan -%] preference.</div> > </li> >+ <li> >+ <label for="enforce_expiry_notice">Enforce patron expiry notice:</label> >+ <select name="enforce_expiry_notice" id="enforce_expiry_notice"> >+ [% IF category.enforce_expiry_notice %] >+ <option value="1" selected>Yes</option> >+ <option value="0">No</option> >+ [% ELSE %] >+ <option value="1">Yes</option> >+ <option value="0" selected>No</option> >+ [% END %] >+ </select> >+ <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> >+ </li> > </ol> > </fieldset> > >@@ -657,6 +670,7 @@ > <th scope="col" data-colname="checkout_charge_limit">Checkout charge limit</th> > <th scope="col" data-colname="guarantees_checkout_charge_limit">Guarantees checkout charge limit</th> > <th scope="col" data-colname="guarantors_checkout_charge_limit">Guarantors with guarantees checkout charge limit</th> >+ <th scope="col" data-colname="enforce_expiry_notice">Enforce patron expiry notice</th> > <th scope="col" class="no-export" data-colname="actions">Actions</th> > </tr> > </thead> >@@ -832,6 +846,7 @@ > [% ELSE %] > <td>[% 0.00 | $Price %]</td> > [% END %] >+ <td>[% IF category.enforce_expiry_notice %]Yes[% ELSE %]No[% END %]</td> > <td class="actions"> > <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=add_form&categorycode=[% category.categorycode |uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> > <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=delete_confirm&categorycode=[% category.categorycode |uri %]"><i class="fa fa-trash-can"></i> Delete</a> >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 6c4c4db1c6b..4c092e4e40b 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_') %] > <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]"> >diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl >index 66f070c6774..399451790a2 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' ) { >-- >2.48.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30301
:
175086
|
175087
|
175088
|
175089
|
175526
|
175527
|
175528
|
175529
|
181102
|
181103
|
181104
|
181105
|
181106
|
181107
|
181108
|
182152
|
182153
|
182154
|
182155
|
182156
|
182157
|
182158
|
182527
|
182529
|
182530
|
182531
|
182532
|
182533
|
182534
|
182535
|
182536
|
182537
|
182538
|
182645