From 023e5eb0cad8a88116f51d0a5e90c42093cd4113 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 14 Apr 2022 18:02:22 +0000 Subject: [PATCH] Bug 30549: Replace the use of jQueryUI Accordion on pending patron updates page This patch updates the pending patron updates page to use Bootstrap collapse instead of jQueryUI. This patch contains whitespace changes, so view the diff with this in mind. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - If necessary, log into the OPAC and submit an update via the "Your personal details" page. Ideally do this for two or more patrons. - In the staff client, follow the "Patrons requesting modifications" link. - On the "Update patron records" page you should see the headings representing each of the patrons with pending updates. The first panel should be expanded. - Confirm that the panels expand and collapse correctly. - Follow the "Patron details" link for one of these patrons. - Click the "Review pending modifications" link on the patron detail page. - When the update page opens that patron's panel should be expanded. Signed-off-by: Lisette Scheer Signed-off-by: Tomas Cohen Arazi Signed-off-by: Fridolin Somers --- .../prog/en/modules/members/members-update.tt | 185 +++++++++--------- 1 file changed, 94 insertions(+), 91 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt index b269c15ae2..9384c653c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt @@ -111,93 +111,101 @@

Update patron records

[% IF PendingModifications %]
-
- [% FOREACH pm IN PendingModifications %] - [% SET borrowernumber = pm.borrowernumber %] -

[% borrowers.$borrowernumber.surname | html %][% IF ( borrowers.$borrowernumber.firstname ) %], [% borrowers.$borrowernumber.firstname | html %][% END %] - [% Categories.GetName( borrowers.$borrowernumber.categorycode ) | html %] ([% Branches.GetName( borrowers.$borrowernumber.branchcode ) | html %]) ([% borrowers.$borrowernumber.cardnumber | html %]) - Requested on [% pm.timestamp | $KohaDates with_hours = 1 %]

-
-
- - - - - - - - - | Patron details -
- - [% IF borrowers.$borrowernumber.gonenoaddress > 0 %] -
-

Patron's address in doubt

-

The Gone no address flag is set for this patron. If this modification request resolves the issue, please unset the flag.

- - +
+ [% FOREACH pm IN PendingModifications %] + [% SET borrowernumber = pm.borrowernumber %] +
+ +
+
+
+ + + + + + + + + | Patron details
- [% END %] - - [% IF !pm.extended_attributes and pm.size > 3 or pm.extended_attributes and pm.size > 4 %] - [%# timestamp+verification_token+borrowernumber=3 %] -
- - - - - - - - - [% FOREACH key IN pm.keys %] - [% IF ( key != "timestamp" and key != "extended_attributes" ) %] - [% IF ( ( pm.$key OR borrowers.$borrowernumber.$key ) && ( pm.$key != borrowers.$borrowernumber.$key ) ) %] - - - [% IF ( key == "dateofbirth" ) %] - - - [% ELSIF key == 'branchcode' %] - - - [% ELSE %] - - + + [% IF borrowers.$borrowernumber.gonenoaddress > 0 %] +
+

Patron's address in doubt

+

The Gone no address flag is set for this patron. If this modification request resolves the issue, please unset the flag.

+ + +
+ [% END %] + + [% IF !pm.extended_attributes and pm.size > 3 or pm.extended_attributes and pm.size > 4 %] + [%# timestamp+verification_token+borrowernumber=3 %] +
+
FieldOld valueNew value
[% PROCESS display_names field = key %][% borrowers.$borrowernumber.$key | $KohaDates %][% pm.$key | $KohaDates %][% Branches.GetName( borrowers.$borrowernumber.$key ) | html %][% Branches.GetName( pm.$key ) | html %][% borrowers.$borrowernumber.$key | html %][% pm.$key | html %]
+ + + + + + + + [% FOREACH key IN pm.keys %] + [% IF ( key != "timestamp" and key != "extended_attributes" ) %] + [% IF ( ( pm.$key OR borrowers.$borrowernumber.$key ) && ( pm.$key != borrowers.$borrowernumber.$key ) ) %] + + + [% IF ( key == "dateofbirth" ) %] + + + [% ELSIF key == 'branchcode' %] + + + [% ELSE %] + + + [% END %] + [% END %] + [% END %] + [% END %] +
FieldOld valueNew value
[% PROCESS display_names field = key %][% borrowers.$borrowernumber.$key | $KohaDates %][% pm.$key | $KohaDates %][% Branches.GetName( borrowers.$borrowernumber.$key ) | html %][% Branches.GetName( pm.$key ) | html %][% borrowers.$borrowernumber.$key | html %][% pm.$key | html %]
+
+ [% END # /!pm.extended_attributes %] + [% IF borrowers.$borrowernumber.modified_attributes %] +
+

[% PROCESS display_names field='extended_attributes' %]

+ + + + + + + [% FOREACH attribute_group IN borrowers.$borrowernumber.modified_attributes %] + + + + [% END %] - [% END %] - [% END %] -
FieldOld valueNew value
[% attribute_group.type.description | html %][% PROCESS display_extended_attributes attrs=attribute_group.before type=attribute_group.type %][% PROCESS display_extended_attributes attrs=attribute_group.after type=attribute_group.type %]
-
- [% END %] - [% IF borrowers.$borrowernumber.modified_attributes %] -
-

[% PROCESS display_names field='extended_attributes' %]

- - - - - - - [% FOREACH attribute_group IN borrowers.$borrowernumber.modified_attributes %] - - - - - - [% END %] -
FieldOld valueNew value
[% attribute_group.type.description | html %][% PROCESS display_extended_attributes attrs=attribute_group.before type=attribute_group.type %][% PROCESS display_extended_attributes attrs=attribute_group.after type=attribute_group.type %]
-
- [% END %] -
- [% END %] -
+ +
+ [% END # / borrowers.$borrowernumber.modified_attributes %] +
+
+
+ [% END # /FOREACH pm %] +
[% ELSE %] -
-

There are no pending patron modifications.

-
+
+

There are no pending patron modifications.

+
[% END %] @@ -207,17 +215,12 @@ [% INCLUDE 'str/members-menu.inc' %] [% Asset.js("js/members-menu.js") | $raw %] [% END %] -- 2.39.5