Bugzilla – Attachment 193524 Details for
Bug 26355
Allow patrons to self-renew through the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26355: Add the new category fields to the UI
Bug-26355-Add-the-new-category-fields-to-the-UI.patch (text/plain), 9.50 KB, created by
Matt Blenkinsop
on 2026-02-20 10:59:26 UTC
(
hide
)
Description:
Bug 26355: Add the new category fields to the UI
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2026-02-20 10:59:26 UTC
Size:
9.50 KB
patch
obsolete
>From a6de53e5363c75dc40873d8dde2025834ea9ca8b Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >Date: Thu, 19 Feb 2026 13:29:15 +0000 >Subject: [PATCH] Bug 26355: Add the new category fields to the UI > >--- > admin/categories.pl | 18 ++++++ > .../prog/en/modules/admin/categories.tt | 59 +++++++++++++++++++ > 2 files changed, 77 insertions(+) > >diff --git a/admin/categories.pl b/admin/categories.pl >index d471e9cc768..cee0f9e2d10 100755 >--- a/admin/categories.pl >+++ b/admin/categories.pl >@@ -79,6 +79,12 @@ if ( $op eq 'add_form' ) { > my $noissueschargeguarantees = $input->param('noissueschargeguarantees') || undef; > my $noissueschargeguarantorswithguarantees = $input->param('noissueschargeguarantorswithguarantees') || undef; > my $enforce_expiry_notice = $input->param('enforce_expiry_notice'); >+ my $self_renewal_enabled = $input->param('self_renewal_enabled'); >+ my $self_renewal_availability_start = $input->param('self_renewal_availability_start'); >+ my $self_renewal_fines_block = $input->param('self_renewal_fines_block'); >+ my $self_renewal_failure_message = $input->param('self_renewal_failure_message'); >+ my $self_renewal_information_message = $input->param('self_renewal_information_message'); >+ my $self_renewal_if_expired = $input->param('self_renewal_if_expired'); > > my @branches = grep { $_ ne q{} } $input->multi_param('branches'); > my $can_be_guarantee = $input->param('can_be_guarantee'); >@@ -120,6 +126,12 @@ if ( $op eq 'add_form' ) { > $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); >+ $category->self_renewal_enabled($self_renewal_enabled); >+ $category->self_renewal_availability_start($self_renewal_availability_start); >+ $category->self_renewal_fines_block($self_renewal_fines_block); >+ $category->self_renewal_failure_message($self_renewal_failure_message); >+ $category->self_renewal_information_message($self_renewal_information_message); >+ $category->self_renewal_if_expired($self_renewal_if_expired); > eval { > $category->store; > $category->replace_library_limits( \@branches ); >@@ -158,6 +170,12 @@ if ( $op eq 'add_form' ) { > noissueschargeguarantorswithguarantees => $noissueschargeguarantorswithguarantees, > enforce_expiry_notice => $enforce_expiry_notice, > force_password_reset_when_set_by_staff => $force_password_reset_when_set_by_staff, >+ self_renewal_enabled => $self_renewal_enabled, >+ self_renewal_availability_start => $self_renewal_availability_start, >+ self_renewal_fines_block => $self_renewal_fines_block, >+ self_renewal_failure_message => $self_renewal_failure_message, >+ self_renewal_information_message => $self_renewal_information_message, >+ self_renewal_if_expired => $self_renewal_if_expired, > } > ); > eval { >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 c0a66967ffb..24dcf3e6c18 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >@@ -504,6 +504,12 @@ > [%- SET pref_NoIssuesChargeGuarantorsWithGuarantees_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=NoIssuesChargeGuarantorsWithGuarantees&ok=Search">NoIssuesChargeGuarantorsWithGuarantees</a>' -%] > <div class="hint">If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantorsWithGuarantees_link | $raw | $KohaSpan -%] system preference.</div> > </li> >+ </ol> >+ </fieldset> >+ >+ <fieldset class="rows"> >+ <legend>Account expiry and self-renewal</legend> >+ <ol> > <li> > <label for="enforce_expiry_notice">Enforce patron account expiry notice:</label> > <select name="enforce_expiry_notice" id="enforce_expiry_notice"> >@@ -517,6 +523,59 @@ > </select> > <div class="hint">Make the account expiry notice mandatory for all patrons in this category and prevent patrons from opting out in the messaging preferences</div> > </li> >+ <li> >+ <label for="self_renewal_enabled">Allow self-renewal:</label> >+ <select name="self_renewal_enabled" id="self_renewal_enabled"> >+ [% IF category.self_renewal_enabled %] >+ <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">Allow patrons to self renew via the OPAC</div> >+ </li> >+ <li> >+ <label for="self_renewal_availability_start">Self-renewal availability period: </label> >+ <input type="text" name="self_renewal_availability_start" id="self_renewal_availability_start" value="[% category.self_renewal_availability_start | html %]" size="3" maxlength="5" /> days >+ [%- SET pre_notifyborrowerdeparture_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=NotifyBorrowerDeparture&ok=Search">NotifyBorrowerDeparture</a>' -%] >+ <div class="hint" >+ >How long before expiry the self-renewal page will be made available to the patron. If set, this will override the global value set in the [%- pre_notifyborrowerdeparture_link | $raw | $KohaSpan -%] system >+ preference.</div >+ > >+ </li> >+ <li> >+ <label for="self_renewal_fines_block">Self-renewal charge limit: </label> >+ <input type="text" pattern="^\d+(\.\d{2})?$" name="self_renewal_fines_block" id="self_renewal_fines_block" value="[% category.self_renewal_fines_block | $Price on_editing => 1 %]" size="5" maxlength="8" /> >+ [%- SET pref_noissuescharge_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noissuescharge&ok=Search">noissuescharge</a>' -%] >+ <div class="hint" >+ >How much can be accrued in charges before self-renewal is blocked for the patron. If set, this will override charge levels set for this category. If these are not set then it overrides the global value set in >+ the [%- pref_noissuescharge_link | $raw | $KohaSpan -%] system preference.</div >+ > >+ </li> >+ <li> >+ <label for="self_renewal_information_message">Self-renewal information message: </label> >+ [% IF (category.self_renewal_information_message) %] >+ <textarea type="text" name="self_renewal_information_message" id="self_renewal_information_message" cols="40" rows="2">[% category.self_renewal_information_message | html %]</textarea> >+ [% ELSE %] >+ <textarea type="text" name="self_renewal_information_message" id="self_renewal_information_message" cols="40" rows="4"></textarea> >+ [% END %] >+ </li> >+ <li> >+ <label for="self_renewal_failure_message">Self-renewal failure message: </label> >+ [% IF (category.self_renewal_failure_message) %] >+ <textarea type="text" name="self_renewal_failure_message" id="self_renewal_failure_message" cols="40" rows="2">[% category.self_renewal_failure_message | html %]</textarea> >+ [% ELSE %] >+ [% SET default_message = t("Your self-renewal can't be processed at this time. Please visit your local branch to complete your renewal.") %] >+ <textarea type="text" name="self_renewal_failure_message" id="self_renewal_failure_message" cols="40" rows="4">[% default_message | html %]</textarea> >+ [% END %] >+ </li> >+ <li> >+ <label for="self_renewal_if_expired">Self-renewal availability post-expiry: </label> >+ <input type="text" name="self_renewal_if_expired" id="self_renewal_if_expired" value="[% category.self_renewal_if_expired | html %]" size="3" maxlength="5" /> days >+ <div class="hint">How long after a patron's account has expired before self-renewal will no longer be available.</div> >+ </li> > </ol> > </fieldset> > >-- >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 26355
:
191781
|
191782
|
191783
|
191784
|
191785
|
191786
|
191787
|
191788
|
191789
|
192440
|
192441
|
192442
|
192443
|
192444
|
192445
|
192446
|
192447
|
192448
|
193065
|
193066
|
193067
|
193068
|
193069
|
193070
|
193071
|
193072
|
193073
|
193074
|
193249
|
193250
|
193251
|
193252
|
193253
|
193521
|
193522
|
193523
|
193524
|
193525
|
193526
|
193527
|
193528
|
193529
|
193581
|
193635
|
193654
|
193699
|
193756
|
193757
|
193758
|
193759
|
193760
|
193761
|
193762
|
193763
|
193764
|
193765
|
193921
|
194435
|
194464
|
194465
|
194466
|
194467
|
194468
|
194469
|
194470
|
194471
|
194472
|
194473
|
194474