Bugzilla – Attachment 192444 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 and attribute columns to the UI
Bug-26355-Add-the-new-category-and-attribute-colum.patch (text/plain), 15.11 KB, created by
Matt Blenkinsop
on 2026-02-04 10:57:00 UTC
(
hide
)
Description:
Bug 26355: Add the new category and attribute columns to the UI
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2026-02-04 10:57:00 UTC
Size:
15.11 KB
patch
obsolete
>From baa24106b382dfb35e1bdc0a60da15bee1287161 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >Date: Wed, 21 Jan 2026 09:42:22 +0000 >Subject: [PATCH] Bug 26355: Add the new category and attribute columns to the > UI > >Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> >--- > admin/categories.pl | 15 +++++ > admin/patron-attr-types.pl | 60 ++++++++++--------- > .../prog/en/modules/admin/categories.tt | 51 ++++++++++++++++ > .../en/modules/admin/patron-attr-types.tt | 9 +++ > 4 files changed, 106 insertions(+), 29 deletions(-) > >diff --git a/admin/categories.pl b/admin/categories.pl >index b2957c10850..a890dec117e 100755 >--- a/admin/categories.pl >+++ b/admin/categories.pl >@@ -80,6 +80,11 @@ 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_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'); >@@ -122,6 +127,11 @@ 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_if_expired($self_renewal_if_expired); > eval { > $category->store; > $category->replace_library_limits( \@branches ); >@@ -161,6 +171,11 @@ 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_if_expired => $self_renewal_if_expired, > } > ); > eval { >diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl >index 47c16306a8a..2abb7cfee05 100755 >--- a/admin/patron-attr-types.pl >+++ b/admin/patron-attr-types.pl >@@ -106,21 +106,22 @@ sub add_update_attribute_type { > my $template = shift; > my $code = shift; > >- my $description = $input->param('description'); >- my $repeatable = $input->param('repeatable') ? 1 : 0; >- my $unique_id = $input->param('unique_id') ? 1 : 0; >- my $is_date = $input->param('is_date') ? 1 : 0; >- my $opac_display = $input->param('opac_display') ? 1 : 0; >- my $opac_editable = $input->param('opac_editable') ? 1 : 0; >- my $staff_searchable = $input->param('staff_searchable') ? 1 : 0; >- my $searched_by_default = $input->param('searched_by_default') ? 1 : 0; >- my $keep_for_pseudonymization = $input->param('keep_for_pseudonymization') ? 1 : 0; >- my $mandatory = $input->param('mandatory') ? 1 : 0; >- my $opac_mandatory = $input->param('opac_mandatory') ? 1 : 0; >- my $authorised_value_category = $input->param('authorised_value_category'); >- my $display_checkout = $input->param('display_checkout') ? 1 : 0; >- my $category_code = $input->param('category_code') || undef; >- my $class = $input->param('class'); >+ my $description = $input->param('description'); >+ my $repeatable = $input->param('repeatable') ? 1 : 0; >+ my $unique_id = $input->param('unique_id') ? 1 : 0; >+ my $is_date = $input->param('is_date') ? 1 : 0; >+ my $opac_display = $input->param('opac_display') ? 1 : 0; >+ my $opac_editable = $input->param('opac_editable') ? 1 : 0; >+ my $staff_searchable = $input->param('staff_searchable') ? 1 : 0; >+ my $searched_by_default = $input->param('searched_by_default') ? 1 : 0; >+ my $keep_for_pseudonymization = $input->param('keep_for_pseudonymization') ? 1 : 0; >+ my $mandatory = $input->param('mandatory') ? 1 : 0; >+ my $opac_mandatory = $input->param('opac_mandatory') ? 1 : 0; >+ my $self_renewal_verification_check = $input->param('self_renewal_verification_check') ? 1 : 0; >+ my $authorised_value_category = $input->param('authorised_value_category'); >+ my $display_checkout = $input->param('display_checkout') ? 1 : 0; >+ my $category_code = $input->param('category_code') || undef; >+ my $class = $input->param('class'); > > my $attr_type = Koha::Patron::Attribute::Types->find($code); > if ( $op eq 'edit' ) { >@@ -144,20 +145,21 @@ sub add_update_attribute_type { > > $attr_type->set( > { >- repeatable => $repeatable, >- unique_id => $unique_id, >- is_date => $is_date, >- opac_display => $opac_display, >- opac_editable => $opac_editable, >- staff_searchable => $staff_searchable, >- searched_by_default => $searched_by_default, >- keep_for_pseudonymization => $keep_for_pseudonymization, >- mandatory => $mandatory, >- opac_mandatory => $opac_mandatory, >- authorised_value_category => $authorised_value_category, >- display_checkout => $display_checkout, >- category_code => $category_code, >- class => $class, >+ repeatable => $repeatable, >+ unique_id => $unique_id, >+ is_date => $is_date, >+ opac_display => $opac_display, >+ opac_editable => $opac_editable, >+ staff_searchable => $staff_searchable, >+ searched_by_default => $searched_by_default, >+ keep_for_pseudonymization => $keep_for_pseudonymization, >+ mandatory => $mandatory, >+ opac_mandatory => $opac_mandatory, >+ self_renewal_verification_check => $self_renewal_verification_check, >+ authorised_value_category => $authorised_value_category, >+ display_checkout => $display_checkout, >+ category_code => $category_code, >+ class => $class, > } > )->store; > >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 e91ba21feb3..13a338de5d0 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,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"> >@@ -521,6 +527,51 @@ > </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_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> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >index 631a41867b8..ada7fa5e819 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >@@ -211,6 +211,15 @@ > [% END %] > <span class="hint">Check to show this attribute in the brief information panel in the patron's record (staff interface).</span> > </li> >+ <li >+ ><label for="self_renewal_verification_check">Self-renewal verification check: </label> >+ [% IF attribute_type AND attribute_type.self_renewal_verification_check %] >+ <input type="checkbox" id="self_renewal_verification_check" name="self_renewal_verification_check" checked="checked" /> >+ [% ELSE %] >+ <input type="checkbox" id="self_renewal_verification_check" name="self_renewal_verification_check" /> >+ [% END %] >+ <span class="hint">Check to use this as a verification step when a patron goes through self-renewal.</span> >+ </li> > > [% IF Koha.Preference('Pseudonymization') %] > <li> >-- >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