From be13762459cb810767287fa2a367091a1df94fda Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 19 Mar 2015 16:39:13 +0100 Subject: [PATCH] [SIGNED-OFF] 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 --- 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 c0c117b..e61782c 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 f812709..b1a8565 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 %] -- 1.7.10.4