From 9bed7e3b55951944dab73caa1624eddb89ea442d Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 27 Nov 2014 09:13:14 -0300 Subject: [PATCH] Bug 13355: System preferences tab value wrong in templates This patch fixes a bug on the system preferences tab templates. To test: To reproduce: (1) - Choose a tab on the sysprefs section (for example 'Enhanced Content') - Right click on 'Enhanced Content preferences' title, and choose to 'inspect' the code => FAIL: you will see below the form tag something like: (2) - Do a syspref search (for example 'facet'). - Right click on one of the category titles (for example 'OPAC preferences') => FAIL: you will see below the form tag something like: - Apply the patch - Repeat (1) and (2) => SUCCESS: you will see below the form tag something like: and respectively. - Sign off :-D Regards --- admin/preferences.pl | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/preferences.pl b/admin/preferences.pl index f791095..dbc3644 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -262,7 +262,7 @@ sub SearchPrefs { if ( $matched_groups ) { my ( $title, $LINES ) = TransformPrefsToHTML( { $title => $matched_groups }, $searchfield ); - push @tabs, { tab => $tab, tab_title => $title, LINES => $LINES, }; + push @tabs, { tab => $tab, tab_title => $title, LINES => $LINES, tab_id => $tab_name }; } } @@ -346,7 +346,7 @@ if ( $op eq 'search' ) { if ( $tab ) { my ( $tab_title, $LINES ) = TransformPrefsToHTML( GetTab( $input, $tab ), $highlighted ); - push @TABS, { tab_title => $tab_title, LINES => $LINES }; + push @TABS, { tab_title => $tab_title, LINES => $LINES, tab_id => $tab }; $template->param( $tab => 1, tab => $tab, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt index dde4764..3a5f2b8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -76,7 +76,7 @@
[% UNLESS ( searchfield ) %]
[% END %] - + [% FOREACH LINE IN TAB.LINES %] [% IF ( LINE.is_group_title ) %] -- 1.9.1