From 94836adbfb1387fe3c359212ae8faaf8fcfe6654 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 19 Mar 2015 16:39:13 +0100 Subject: [PATCH] Bug 13875: Columns configuration - Allow underscore in table name This is a bug fix for bug the columns configuration feature, and specialy for bug 13864. Test plan: Apply patches on bug 13864 and save columns for the late orders (in the columns configuration admin page). Confirm that they are correctly saved. Signed-off-by: Josef Moravec works as expected Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- admin/columns_settings.pl | 2 +- .../prog/en/modules/admin/columns_settings.tt | 27 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/admin/columns_settings.pl b/admin/columns_settings.pl index c0c117bb27..e61782c5ff 100755 --- a/admin/columns_settings.pl +++ b/admin/columns_settings.pl @@ -27,7 +27,7 @@ if ( $action eq 'save' ) { my @columnids = $input->param("columnid"); my @columns; for my $columnid (@columnids) { - next unless $columnid =~ m|^([^_]*)_([^_]*)_(.*)$|; + next unless $columnid =~ m|^([^#]*)#([^#]*)#(.*)$|; my $is_hidden = $input->param( $columnid . '_hidden' ) // 0; my $cannot_be_toggled = $input->param( $columnid . '_cannot_be_toggled' ) // 0; 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 f8127091a5..b1a8565396 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 @@ -22,42 +22,43 @@ Column nameIs hidden by defaultCannot be toggled [% FOR column IN tables.$pagename.$tablename %] + [% SET value = pagename _ '#' _ tablename _ '#' _ column.columnname %] [% column.columnname %] - + [% IF column.is_hidden %] [% IF column.cannot_be_modified %] - - + + [% ELSE %] - + [% END %] [% ELSE %] [% IF column.cannot_be_modified %] - - + + [% ELSE %] - + [% END %] [% END %] [% IF column.cannot_be_toggled %] [% IF column.cannot_be_modified %] - - + + [% ELSE %] - + [% END %] [% ELSE %] [% IF column.cannot_be_modified %] - - + + [% ELSE %] - + [% END %] [% END %] -- 2.39.5