https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30221

Jonathan Druart <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA

--- Comment #43 from Jonathan Druart <[email protected]> ---
It's better but still not how it works.

1. bKohaColumnsUseNames is not set on the table you modified

2. Columns must be displayed, then you adjust the content and the visibility

example:
```
[% IF show_itemtype_column %]
  <th data-colname="item_type">Requested item type</th>
[% END %]
...
[% IF show_itemtype_column %]
  <td>[% some_data %]</td>
[% END %]
```

Must be:
// Always add the column to the DOM
<th data-colname="item_type">Requested item type</th>
...
[% IF show_itemtype_column %]
  <td>[% some_data %]</td>
[% ELSE %]
  // Empty the column, do not leak data
  <td></td>
[% END %]

THEN hide the column in the JS part:

let itemtype_column = table_settings.columns.find(c => c.columnname ==
'item_type');
[% IF !show_itemtype_column %]
  itemtype_column.is_hidden = 1;
  itemtype_column.cannot_be_toggled = 1;
  itemtype_column.force_visibility = 1;
[% ELSE %]

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to