From 0c5634d21aaa50b73a7039c3f870673390633100 Mon Sep 17 00:00:00 2001 From: Arthur Suzuki Date: Mon, 23 Dec 2024 16:25:26 +0100 Subject: [PATCH] Bug 38776: new "R_COMMENTS" authorized value category for manual restrictions comments Test plan : - on a patron page, add a manual restriction and fill in a comment, that needs to be typed-in - apply patch - create a new authorized value category named "R_COMMENTS" and create a couple of values with a description - return to patron page and when adding a manual restriction, on click on the input field you would be proposed the authorized values descriptions. - also you can inspect the code and see that there is a datalist element containing the list of options. --- .../prog/en/includes/patron-restrictions-tab.inc | 11 ++++++++++- .../prog/en/modules/admin/authorised_values.tt | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc index d1a4a64ccd5..aadf9f5bebe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc @@ -80,7 +80,16 @@ [% END %] -
  • +
  • + + + + [% FOREACH rcomment IN AuthorisedValues.Get( 'R_COMMENTS' ) %] + + [% END %] + + +
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt index b25ac29e6ad..9dd5f46a4bb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt @@ -542,7 +542,9 @@ [% CASE 'REPORT_SUBGROUP' %]

    Can be used to further sort and filter your reports. This category is empty by default. Values here need to include the authorized value code from REPORT_GROUP in the Description (OPAC) field to link the subgroup to the appropriate group.

    [% CASE 'RESTRICTED' %] -

    Restricted status of an item

    +

    Restricted status of an item

    + [% CASE 'R_COMMENTS' %] +

    Values for custom patron restriction comments to pre-fill the manual restrictions. The value in the description field should be the message text and is limited to 200 characters

    [% CASE 'ROADTYPE' %]

    Road types to be used in patron addresses

    [% CASE 'SIP_MEDIA_TYPE' %] -- 2.46.1