5 use YAML
qw( LoadFile );
9 use C4
::Utils
::DataTables
::TablesSettings
qw( get_modules );
12 my ( $template, $loggedinuser, $cookie ) = get_template_and_user
(
14 template_name
=> "admin/columns_settings.tt",
18 flagsrequired
=> { parameters
=> 'manage_column_config' },
23 my $action = $input->param('action') // 'list';
25 if ( $action eq 'save' ) {
26 my $module = $input->param('module');
27 my @columnids = $input->multi_param("columnid");
29 for my $columnid (@columnids) {
30 next unless $columnid =~ m
|^([^#]*)#([^#]*)#(.*)$|;
31 my $is_hidden = $input->param( $columnid . '_hidden' ) // 0;
32 my $cannot_be_toggled =
33 $input->param( $columnid . '_cannot_be_toggled' ) // 0;
40 is_hidden
=> $is_hidden,
41 cannot_be_toggled
=> $cannot_be_toggled,
45 C4
::Utils
::DataTables
::TablesSettings
::update_columns
(
54 if ( $action eq 'list' ) {
55 my $modules = C4
::Utils
::DataTables
::TablesSettings
::get_modules
;
57 panel
=> ( $input->param('panel') || 0 ),
62 output_html_with_http_headers
$input, $cookie, $template->output;