Bugzilla – Attachment 175528 Details for
Bug 30301
Add a system preference to allow specifying the patron expiration notices as mandatory
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), 8.50 KB, created by
Andrew Fuerste-Henry
on 2024-12-16 16:40:32 UTC
(
hide
)
Description:
Bug 30301: Update templates
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2024-12-16 16:40:32 UTC
Size:
8.50 KB
patch
obsolete
>From 5d84683403770dfc9e1470e33a04531cddaa754e 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 | 5 ++++- > .../en/includes/messaging-preference-form.inc | 1 + > .../prog/en/modules/admin/categories.tt | 15 +++++++++++++++ > .../bootstrap/en/modules/opac-messaging.tt | 1 + > opac/opac-messaging.pl | 1 + > 5 files changed, 22 insertions(+), 1 deletion(-) > >diff --git a/admin/categories.pl b/admin/categories.pl >index ce1bd85d28..cd58eb5d85 100755 >--- a/admin/categories.pl >+++ b/admin/categories.pl >@@ -78,8 +78,9 @@ elsif ( $op eq 'cud-add_validate' ) { > my $min_password_length = $input->param('min_password_length'); > my $require_strong_password = $input->param('require_strong_password'); > my $noissuescharge = $input->param('noissuescharge') || undef; >- my $noissueschargeguarantees = $input->param('noissueschargeguarantees') || 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'); >@@ -121,6 +122,7 @@ elsif ( $op eq 'cud-add_validate' ) { > $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 ); >@@ -158,6 +160,7 @@ elsif ( $op eq 'cud-add_validate' ) { > 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 b7c0c63d9d..a773140155 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 >@@ -18,6 +18,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 %]"> >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 aa1785de62..4b07bb08b6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >@@ -495,6 +495,19 @@ > <input type="text" pattern="^\d+(\.\d{2})?$" name="noissueschargeguarantorswithguarantees" id="noissueschargeguarantorswithguarantees" value="[% category.noissueschargeguarantorswithguarantees | $Price on_editing => 1 %]" class="decimal" size="3" maxlength="4" /> > <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> > </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> > >@@ -643,6 +656,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" data-colname="actions">Actions</th> > </tr> > </thead> >@@ -796,6 +810,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 38a88151d2..3785bfa692 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -60,6 +60,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 a3eab4d74f..39fc76d089 100755 >--- a/opac/opac-messaging.pl >+++ b/opac/opac-messaging.pl >@@ -77,6 +77,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.39.5
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