From baa24106b382dfb35e1bdc0a60da15bee1287161 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop 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 --- 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 = 'NoIssuesChargeGuarantorsWithGuarantees' -%]
If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantorsWithGuarantees_link | $raw | $KohaSpan -%] system preference.
+ + + +
+ Account expiry and self-renewal +
  1. Make the account expiry notice mandatory for all patrons in this category and prevent patrons from opting out in the messaging preferences
  2. +
  3. + + +
    Allow patrons to self renew via the OPAC
    +
  4. +
  5. + + days + [%- SET pre_notifyborrowerdeparture_link = 'NotifyBorrowerDeparture' -%] +
    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.
    +
  6. +
  7. + + + [%- SET pref_noissuescharge_link = 'noissuescharge' -%] +
    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.
    +
  8. +
  9. + + [% IF (category.self_renewal_failure_message) %] + + [% ELSE %] + [% SET default_message = t("Your self-renewal can't be processed at this time. Please visit your local branch to complete your renewal.") %] + + [% END %] +
  10. +
  11. + + days +
    How long after a patron's account has expired before self-renewal will no longer be available.
    +
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 %] Check to show this attribute in the brief information panel in the patron's record (staff interface). +
  • + [% IF attribute_type AND attribute_type.self_renewal_verification_check %] + + [% ELSE %] + + [% END %] + Check to use this as a verification step when a patron goes through self-renewal. +
  • [% IF Koha.Preference('Pseudonymization') %]
  • -- 2.39.5