From bb5c4d7c588092f17d11343c44b8752cc2772868 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 12 Feb 2026 15:18:54 -0500 Subject: [PATCH] Bug 42096: Update patron clubs pages to use grid layout for forms This patch updates patron clubs-related 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: - Tools -> Patron clubs -> New (or edit) club template - Tools -> Patron clubs -> New (or edit) club - Patrons -> Patron detail page -> Clubs tab -> Enroll Sponsored-by: Athens County Public Libraries --- .../prog/en/modules/clubs/clubs-add-modify.tt | 78 +++-- .../prog/en/modules/clubs/patron-enroll.tt | 60 ++-- .../en/modules/clubs/templates-add-modify.tt | 326 +++++++++++------- 3 files changed, 282 insertions(+), 182 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt index a4af8dae066..47c9b8e6f56 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt @@ -50,7 +50,7 @@ -
+

[% IF club %] @@ -61,43 +61,64 @@

-
    -
  1. +
    +
    +
    +
    - Required -
  2. + +
    Required
    + -
  3. +
    +
    +
    +
    -
  4. + + -
  5. +
    +
    +
    +
    -
  6. + + -
  7. +
    +
    +
    +
    -
  8. + + -
  9. +
    +
    +
    +
    -
  10. + + - [% IF club %] - [% FOREACH f IN club.club_fields %] -
  11. + [% IF club %] + [% FOREACH f IN club.club_fields %] +
    +
    - +
    +
    [% IF f.club_template_field.authorised_value_category %] [% END %] -
  12. - [% END %] - [% ELSE %] - [% FOREACH f IN club_template.club_template_fields %] -
  13. + + + [% END %] + [% ELSE %] + [% FOREACH f IN club_template.club_template_fields %] +
    +
    - +
    +
    [% IF f.authorised_value_category %] [% END %] -
  14. - [% END %] + + [% END %] -
+ [% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt index 3f37ed910b0..c168a7f6cca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt @@ -7,16 +7,18 @@ -
-
    - [% IF club_enrollment_fields %] - [% FOREACH f IN club.club_template.club_template_enrollment_fields %] - [% FOREACH c IN club_enrollment_fields %] - [% IF f.id == c.club_template_enrollment_field_id %] -
  1. - +
    + [% IF club_enrollment_fields %] + [% FOREACH f IN club.club_template.club_template_enrollment_fields %] + [% FOREACH c IN club_enrollment_fields %] + [% IF f.id == c.club_template_enrollment_field_id %] +
    +
    + +
    +
    [% IF f.authorised_value_category %] - [% FOREACH a IN AuthorisedValues.Get( f.authorised_value_category ) %] [% IF a.authorised_value == c.value %] @@ -26,35 +28,39 @@ [% END %] [% ELSE %] - + [% END %] - [% f.description | html %] -
  2. - [% END %] + +
    [% f.description | html %]
    + [% END %] [% END %] - [% ELSE %] - [% FOREACH f IN club.club_template.club_template_enrollment_fields %] -
  3. - + [% END %] + [% ELSE %] + [% FOREACH f IN club.club_template.club_template_enrollment_fields %] +
    +
    + +
    +
    [% IF f.authorised_value_category %] - [% FOREACH a IN AuthorisedValues.Get( f.authorised_value_category ) %] [% END %] [% ELSE %] - + [% END %] - [% f.description | html %] -
  4. - [% END %] + +
    [% f.description | html %]
    + [% END %] -
  5. - Finish enrollment - Cancel -
  6. -
+ [% END %] +
+
+ Finish enrollment + Cancel
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt index 86838b098a9..e30d44d32e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt @@ -22,6 +22,7 @@ .club-field, .enrollment-field { border-top: 1px solid #ddd; + padding-top: 1rem; } @@ -62,131 +63,175 @@ [% END %] -
-
    -
  1. - +
    +
    +
    + +
    +
    - Required -
  2. + +
    Required
    + -
  3. +
    +
    +
    +
    -
  4. + + -
  5. - +
    +
    + +
    +
    [% IF club_template.is_enrollable_from_opac %] [% ELSE %] [% END %] - If a template allows public enrollment, patrons can enroll in a club based on this template from the public catalog. -
  6. + +
    If a template allows public enrollment, patrons can enroll in a club based on this template from the public catalog.
    + -
  7. - +
    +
    + +
    +
    [% IF club_template.is_email_required %] [% ELSE %] [% END %] - If set, a club based on this template can only be enrolled in by patrons with a valid email address. -
  8. + +
    If set, a club based on this template can only be enrolled in by patrons with a valid email address.
    + -
  9. +
    +
    +
    +
    -
    If set, only librarians logged in with this branch will be able to modify this club template.
    -
  10. -
+ +
If set, only librarians logged in with this branch will be able to modify this club template.
+
-
- Club fields: +
+

Club fields

These fields will be used in the creation of clubs based on this template

- [% FOREACH f IN club_template.club_template_fields %] -
-
    +
    + [% FOREACH f IN club_template.club_template_fields %] +
    -
  1. - - -
  2. - -
  3. - - -
  4. -
  5. - - -
  6. - -
  7. - - -
  8. -
-
- [% END %] +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+ [% END %] +
Add new field
-
+ -
- Enrollment fields +
+

Enrollment fields

These fields will be used when enrolling a patron in a club based on this template

- [% FOREACH f IN club_template.club_template_enrollment_fields %] -
-
    -
  1. -   - Enrollment field -
  2. -
  3. - - - -
  4. +
    + [% FOREACH f IN club_template.club_template_enrollment_fields %] +
    +
    +
    + + +
    +
    + +
    +
    -
  5. - - -
  6. +
    +
    + +
    +
    + +
    +
    -
  7. - - -
  8. +
    +
    + +
    +
    + +
    +
    -
  9. - - -
  10. -
-
- [% END %] +
+
+ +
+
+ +
+
+
+ [% END %] +
Add new field
-
+
@@ -197,58 +242,83 @@ [% END %]
+
+ Delete field +

[% MACRO jsinclude BLOCK %] -- 2.39.5