From e1596f1fc18724e33f86b8b737fe42ac593431d9 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 12 Feb 2026 12:54:54 -0500 Subject: [PATCH] Bug 41841: Update some patron admin templates to use grid layout for forms This patch updates patron-related administration templates with new markup and CSS for layout forms using CSS grids. To test, apply the patch rebuild the staff interface CSS. Check the following pages, confirming that the "New" and "Edit" versions of the form look correct in each case: - Patron categories - Patron attribute types - Patron restriction types Sponsored-by: Athens County Public Libraries --- .../prog/en/modules/admin/categories.tt | 330 ++++++++++++------ .../en/modules/admin/patron-attr-types.tt | 232 +++++++----- .../prog/en/modules/admin/restrictions.tt | 97 +++-- 3 files changed, 433 insertions(+), 226 deletions(-) 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..282090f1fc8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt @@ -34,8 +34,8 @@ [% INCLUDE 'doc-head-close.inc' %] [% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.min.css") | $raw %] @@ -128,60 +128,99 @@ [% ELSE %]

New category

[% END %] -
-
    - [% IF category %] -
  1. Category code: [% categorycode | html %]
  2. - [% ELSE %] -
  3. +
    + [% IF category %] +
    +
    + Category code: +
    +
    + [% categorycode | html %] + + +
    +
    + [% ELSE %] +
    +
    - - Required -
  4. - [% END %] -
  5. + +
    + +
    +
    Required
    + + [% END %] +
    +
    - - Required -
  6. -
  7. + +
    + +
    +
    Required
    + +
    +
    Enrollment period: +
    +
    Choose one -
      -
    1. +
      +
      +
      +
      [% IF category.enrolmentperiod %] - months + months [% ELSE %] - months + months [% END %] -
    2. -
    3. +
    +
    +
    +
    +
    +
    -
  8. -
+ +
- -
  • + + +
    +
    - days -
  • -
  • + +
    days
    + +
    +
    - years -
  • -
  • + +
    years
    + +
    +
    - years -
  • -
  • + +
    years
    + +
    +
    - -
  • -
  • + +
    + +
    + +
    +
    +
    +
    -
  • -
  • + + +
    +
    +
    +
    -
  • -
  • + + +
    +
    +
    +
    - Required -
  • -
  • + +
    Required
    + +
    +
    +
    +
    -
  • -
  • + + +
    +
    + +
    +
    -
    Limits the use of this category to the selected libraries.
    -
  • -
  • + +
    Limits the use of this category to the selected libraries.
    + +
    +
    +
    +
    -
  • -
  • + + +
    +
    +
    +
    -
  • -
  • + + +
    +
    +
    +
    -
    Leave blank to use system default ([% Koha.Preference('minPasswordLength') | html %])
    -
  • -
  • + +
    Leave blank to use system default ([% Koha.Preference('minPasswordLength') | html %])
    + +
    +
    +
    +
    -
  • -
  • + + +
    +
    +
    +
    -
    Choose whether staff-created patrons of this category are forced to change their password after their first OPAC login.
    -
  • -
  • + +
    Choose whether staff-created patrons of this category are forced to change their password after their first OPAC login.
    + +
    +
    + +
    +
    - [%- SET pref_BlockExpiredPatronOpacActions_link = 'BlockExpiredPatronOpacActions' -%] -
    Choose which OPAC actions, if any, should be blocked for expired patrons in this category. Alternatively, you can use the system preference [%- pref_BlockExpiredPatronOpacActions_link | $raw | $KohaSpan -%] - instead.
    -
  • - [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %] -
  • + + [%- SET pref_BlockExpiredPatronOpacActions_link = 'BlockExpiredPatronOpacActions' -%] +
    Choose which OPAC actions, if any, should be blocked for expired patrons in this category. Alternatively, you can use the system preference [%- pref_BlockExpiredPatronOpacActions_link | $raw | $KohaSpan -%] + instead.
    + + [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %] +
    +
    + +
    +
    -
    Choose whether patrons of this category by default are reminded if they try to borrow an item they borrowed before.
    -
  • - [% END %] - [% IF ( Koha.Preference('ILLModule') ) %] -
  • + +
    Choose whether patrons of this category by default are reminded if they try to borrow an item they borrowed before.
    + + [% END %] + [% IF ( Koha.Preference('ILLModule') ) %] +
    +
    +
    +
    -
    Choose whether patrons of this category can create new interlibrary loan requests.
    -
  • - [% END %] -
  • + +
    Choose whether patrons of this category can create new interlibrary loan requests.
    + + [% END %] +
    +
    +
    +
    -
    Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", - the amount of history kept is controlled by the cronjob batch_anonymise.pl which should be set up by your system administrator.
    -
  • -
  • + +
    + Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the + amount of history kept is controlled by the cronjob batch_anonymise.pl which should be set up by your system administrator. +
    + +
    +
    +
    +
    -
    If Yes, holds placed by patrons of this category will not be given priority.
    -
  • -
  • + +
    If Yes, holds placed by patrons of this category will not be given priority.
    + +
    +
    - - [%- SET pref_noissuescharge_link = 'noissuescharge' -%] -
    If set, this will override the global value set in the [%- pref_noissuescharge_link | $raw | $KohaSpan -%] system preference.
    -
  • -
  • + +
    + +
    + [%- SET pref_noissuescharge_link = 'noissuescharge' -%] +
    If set, this will override the global value set in the [%- pref_noissuescharge_link | $raw | $KohaSpan -%] system preference.
    + +
    +
    - - [%- SET pref_NoIssuesChargeGuarantees_link = 'NoIssuesChargeGuarantees' -%] -
    If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantees_link | $raw | $KohaSpan -%] system preference.
    -
  • -
  • + +
    + +
    + [%- SET pref_NoIssuesChargeGuarantees_link = 'NoIssuesChargeGuarantees' -%] +
    If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantees_link | $raw | $KohaSpan -%] system preference.
    + +
    +
    +
    +
    - [%- SET pref_NoIssuesChargeGuarantorsWithGuarantees_link = 'NoIssuesChargeGuarantorsWithGuarantees' -%] -
    If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantorsWithGuarantees_link | $raw | $KohaSpan -%] system preference.
    -
  • -
  • + + [%- SET pref_NoIssuesChargeGuarantorsWithGuarantees_link = 'NoIssuesChargeGuarantees' -%] +
    If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantorsWithGuarantees_link | $raw | $KohaSpan -%] system preference.
    + +
    +
    +
    +
    -
    Make the account expiry notice mandatory for all patrons in this category and prevent patrons from opting out in the messaging preferences
    -
  • - + +
    Make the account expiry notice mandatory for all patrons in this category and prevent patrons from opting out in the messaging preferences
    + [% IF ( EnhancedMessagingPreferences ) %] 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..d0e459b15e4 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 @@ -87,27 +87,41 @@
    [% INCLUDE 'csrf-token.inc' %] -
    -
      -
    1. - [% IF attribute_type %] +
      +
      + [% IF attribute_type %] +
      Patron attribute type code: +
      +
      [% attribute_type.code |html %] - [% ELSE %] +
      + [% ELSE %] +
      +
      +
      - Required - [% END %] -
    2. -
    3. - - Required -
    4. + +
      Required
      + [% END %] + +
      +
      + +
      +
      + +
      +
      Required
      +
      -
    5. - +
      +
      + +
      +
      [% IF attribute_type %] [% IF attribute_type.repeatable AND NOT can_be_set_to_nonrepeatable %] @@ -120,11 +134,15 @@ [% ELSE %] [% END %] - Check to let a patron record have multiple values of this attribute. -
    6. + +
      Check to let a patron record have multiple values of this attribute.
      + -
    7. - +
      +
      + +
      +
      [% IF attribute_type %] [% IF attribute_type.unique_id %] @@ -137,113 +155,159 @@ [% ELSE %] [% END %] - If checked, attribute will be a unique identifier. If a value is given to a patron record, the same value cannot be given to a different record. -
    8. -
    9. + +
      If checked, attribute will be a unique identifier. If a value is given to a patron record, the same value cannot be given to a different record.
      + +
      +
      + +
      +
      [% IF attribute_type AND attribute_type.is_date %] [% ELSE %] [% END %] - If checked, the attribute will be a date. Date attributes can be repeatable, but cannot be linked to an authorized value category. -
    10. -
    11. + +
      If checked, the attribute will be a date. Date attributes can be repeatable, but cannot be linked to an authorized value category.
      + +
      +
      + +
      +
      [% IF attribute_type AND attribute_type.opac_display %] [% ELSE %] [% END %] - Check to display this attribute on a patron's details page in the OPAC. -
    12. -
    13. + +
      Check to display this attribute on a patron's details page in the OPAC.
      + +
      +
      + +
      +
      [% IF attribute_type AND attribute_type.opac_editable %] [% ELSE %] [% END %] - Check to allow patrons to edit this attribute from their details page in the OPAC. (Requires above) -
    14. -
    15. + +
      Check to allow patrons to edit this attribute from their details page in the OPAC. (Requires above)
      + +
      +
      + +
      +
      [% IF attribute_type AND attribute_type.staff_searchable %] [% ELSE %] [% END %] - Check to make this attribute searchable in staff patron searches. If checked, this attribute will appear in patron search dropdowns. -
    16. -
    17. + +
      Check to make this attribute searchable in staff patron searches. If checked, this attribute will appear in patron search dropdowns.
      + +
      +
      + +
      +
      [% IF attribute_type AND attribute_type.searched_by_default %] [% ELSE %] [% END %] - If checked, this field will be included in 'Standard' patron searches. Requires field to be marked as searchable above -
    18. -
    19. + +
      If checked, this field will be included in 'Standard' patron searches. Requires field to be marked as searchable above
      + +
      +
      + +
      +
      [% IF attribute_type AND attribute_type.mandatory %] [% ELSE %] [% END %] - Check to make this attribute mandatory when creating or editing a patron from the staff interface. -
    20. -
    21. + +
      Check to make this attribute mandatory when creating or editing a patron from the staff interface.
      + +
      +
      + +
      +
      [% IF attribute_type AND attribute_type.opac_mandatory %] [% ELSE %] [% END %] - Check to make this attribute mandatory when creating or editing a patron from the OPAC. Requires 'Editable in OPAC.' -
    22. -
    23. + +
      Check to make this attribute mandatory when creating or editing a patron from the OPAC. Requires 'Editable in OPAC.'
      + +
      +
      + +
      +
      [% IF attribute_type AND attribute_type.display_checkout %] [% ELSE %] [% END %] - Check to show this attribute in the brief information panel in the patron's record (staff interface). -
    24. + +
      Check to show this attribute in the brief information panel in the patron's record (staff interface).
      + - [% IF Koha.Preference('Pseudonymization') %] -
    25. - + [% IF Koha.Preference('Pseudonymization') %] +
      +
      + +
      +
      [% IF attribute_type AND attribute_type.keep_for_pseudonymization %] [% ELSE %] [% END %] - Check to make this attribute copied to the patron's pseudonymized attributes. -
    26. - [% END %] + +
      Check to make this attribute copied to the patron's pseudonymized attributes.
      + + [% END %] -
    27. +
      +
      + +
      +
      -
      If one is selected, the patron record input page will only allow values to be chosen from the authorized value list. However, an authorized value list is not enforced during batch patron import.
      -
    28. -
    29. + +
      If one is selected, the patron record input page will only allow values to be chosen from the authorized value list. However, an authorized value list is not enforced during batch patron import.
      + +
      +
      + +
      +
      -
      Limits the use of this attribute to the selected libraries.
      -
    30. -
    31. + +
      Select "All libraries" if this attribute type should always be displayed. Otherwise select libraries you want to associate with this value.
      + +
      +
      +
      +
      -
      Choose one to limit this attribute to one patron type. Please leave blank if you want these attributes to be available for all types of patrons.
      -
    32. -
    33. + +
      Choose one to limit this attribute to one patron type. Please leave blank if you want these attributes to be available for all types of patrons.
      + +
      +
      - [% PROCESS 'av-build-dropbox.inc' name="class", category="PA_CLASS" default=attribute_type.class empty=1 %] -
      - [% IF ( CAN_user_parameters_manage_auth_values ) %] - Group attributes types with a block title (based on authorized values category 'PA_CLASS') - [% ELSE %] - Group attributes types with a block title (based on authorized values category 'PA_CLASS') - [% END %] -
      -
    34. -
    + +
    [% PROCESS 'av-build-dropbox.inc' name="class", category="PA_CLASS" default=attribute_type.class empty=1 %]
    +
    + [% IF ( CAN_user_parameters_manage_auth_values ) %] + Group attributes types with a block title (based on authorized values category 'PA_CLASS') + [% ELSE %] + Group attributes types with a block title (based on authorized values category 'PA_CLASS') + [% END %] +
    +
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt index cf11b2c6d51..2b7a01b3cf6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt @@ -103,20 +103,31 @@ [% ELSE %]

    New restriction type

    [% END %] -
    -
      - [% IF restriction %] -
    1. - Code: [% restriction.code | html %] +
      + [% IF restriction %] +
      +
      + Code: +
      +
      + [% restriction.code | html %] -
    2. -
    3. + + +
      +
      - - Required -
    4. -
    5. + +
      + +
      +
      Required
      + +
      +
      +
      +
      -
    6. -
    7. + + +
      +
      - -
    8. - [% ELSE %] -
    9. + +
      + +
      + + [% ELSE %] +
      +
      - - Required -
    10. -
    11. + +
      + +
      +
      Required
      + +
      +
      - - Required -
    12. -
    13. + +
      + +
      +
      Required
      + +
      +
      - -
    14. -
    15. + + +
      +
      - -
    16. - [% END %] -
    + +
    + +
    + + [% END %]
    @@ -249,7 +280,7 @@ //Require fee limit if "Lift after payment" is set true $("#lift_after_payment").on("change", function(){ if($(this).val() == 1){ - $("#fee_limit").prop("required",true).after('Required'); + $divee_limit").prop("required",true).after('Required'); } else { $("#fee_limit").prop("required",false).nextAll().remove(); } -- 2.39.5