From c8c8ef9d2edaeb77d2b92042ad397458cb85c917 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 10 Aug 2022 11:27:18 +0100 Subject: [PATCH] Bug 29723: (QA follow-up) Switch to using ID's on column settings This patch updates the column settings page to use ID's instead of Indexes to restor the open accordian card after a setting change. Test plan 1 Go to Administration -> Table settings. 2 All panels should be collapsed. 3 Test expanding and collapsing panels to confirm it's working correctly. 4 Make a change to one of the table configurations. After clicking "Save" the page should reload with the same panel expanded. Signed-off-by: Andrew Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- admin/columns_settings.pl | 2 +- .../prog/en/modules/admin/columns_settings.tt | 35 +++++++++---------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/admin/columns_settings.pl b/admin/columns_settings.pl index 4d040e96a1..994070caf9 100755 --- a/admin/columns_settings.pl +++ b/admin/columns_settings.pl @@ -74,7 +74,7 @@ if ( $action eq 'save' ) { if ( $action eq 'list' ) { my $modules = C4::Utils::DataTables::TablesSettings::get_modules; $template->param( - panel => defined $input->param('panel') ? $input->param('panel') : undef, + panel => defined $input->param('module') ? $input->param('module') : undef, modules => $modules, ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt index 1a02339635..3c3e3a6e0c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt @@ -2,7 +2,6 @@ [% USE Asset %] [% USE TablesSettings %] [% SET footerjs = 1 %] -[% SET panel_id = 0 %] [% BLOCK pagelist %] [% IF module.keys and module.keys.size > 0 %] Jump to: @@ -15,8 +14,6 @@
- - [% SET panel_id = panel_id + 1 %] [% IF module.keys and module.keys.size > 0 %] [% FOR pagename IN module.keys.sort %]

Page: [% pagename | html %]

@@ -205,7 +202,7 @@