Bugzilla – Attachment 172364 Details for
Bug 38069
Table settings not saving
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38069: (bug 37955 follow-up) Fix edition of table settings
Bug-38069-bug-37955-follow-up-Fix-edition-of-table.patch (text/plain), 4.82 KB, created by
Nick Clemens (kidclamp)
on 2024-10-03 16:52:33 UTC
(
hide
)
Description:
Bug 38069: (bug 37955 follow-up) Fix edition of table settings
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-10-03 16:52:33 UTC
Size:
4.82 KB
patch
obsolete
>From fb1246e905c98ec7d3d95c5a528811dda196420b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 3 Oct 2024 09:51:31 +0200 >Subject: [PATCH] Bug 38069: (bug 37955 follow-up) Fix edition of table > settings > >The form cannot longer be saved, and no appear appear (nothing in log, >nothing on the UI) > >This is coming from bug 37955 where we modify the table_id to fix >anchors, but we didn't care of the rest of the code using this TT >variable. > >This patch suggests to replace # and _ with | > >Test plan: >Confirm that the form can be edited, saved, and that it is taken >correctly into account. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > admin/columns_settings.pl | 4 ++-- > .../prog/en/modules/admin/columns_settings.tt | 8 ++++---- > 2 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/admin/columns_settings.pl b/admin/columns_settings.pl >index 3f6d070275c..96d591d7bb1 100755 >--- a/admin/columns_settings.pl >+++ b/admin/columns_settings.pl >@@ -24,7 +24,7 @@ if ( $op eq 'cud-save' ) { > my @columnids = $input->multi_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; >@@ -47,7 +47,7 @@ if ( $op eq 'cud-save' ) { > > my @table_ids = $input->multi_param('table_id'); > for my $table_id (@table_ids) { >- next unless $table_id =~ m|^([^#]*)#(.*)$|; >+ next unless $table_id =~ m{^([^\|]*)\|(.*)$}; > my $default_display_length = $input->param( $table_id . '_default_display_length' ); > my $default_sort_order = $input->param( $table_id . '_default_sort_order' ); > >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 0870bd58dfe..28a3b2a0ead 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 >@@ -23,14 +23,14 @@ > [% IF tables.$pagename.keys and tables.$pagename.keys.size > 1 %] > Jump to table: > [% FOR tablename IN tables.$pagename.keys.sort %] >- [% SET table_id = pagename _ '#' _ tablename %] >+ [% SET table_id = pagename _ '|' _ tablename %] > <a href="#[% table_id | uri %]">[% tablename | html %]</a> > [% UNLESS loop.last %]<span class="separator"> | </span>[% END %] > [% END %] > [% END %] > [% IF tables.$pagename.keys and tables.$pagename.keys.size > 0 %] > [% FOR tablename IN tables.$pagename.keys.sort %] >- [% SET table_id = pagename _ '_' _ tablename %] >+ [% SET table_id = pagename _ '|' _ tablename %] > <div class="datatable_config" id="[% table_id | html %]"> > <input type="hidden" name="table_id" value="[% table_id| html %]" /> > [% IF pagename == 'additem' AND tablename == 'itemst' %] >@@ -57,7 +57,7 @@ > </thead> > <tbody> > [% FOR column IN tables.$pagename.$tablename.columns %] >- [% SET value = pagename _ '#' _ tablename _ '#' _ column.columnname %] >+ [% SET value = pagename _ '|' _ tablename _ '|' _ column.columnname %] > <tr> > <td> > [% column.columnname | html %] >@@ -137,7 +137,7 @@ > [% IF table_settings.default_sort_order.defined %] > <p> > Default sort order: >- <select name="[% pagename | html %]#[% tablename | html %]_default_sort_order"> >+ <select name="[% pagename | html %]|[% tablename | html %]_default_sort_order"> > [% FOR column IN tables.$pagename.$tablename.columns %] > [% IF table_settings.default_sort_order == loop.count - 1 %] > <option value="[% loop.count - 1 %]" selected="selected">[% column.columnname | html %]</option> >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38069
:
172335
| 172364 |
174462
|
174681