View | Details | Raw Unified | Return to bug 16177
Collapse All | Expand All

(-)a/C4/Utils/DataTables/ColumnsSettings.pm (+3 lines)
Lines 50-55 sub get_columns { Link Here
50
    $columns = [ map {
50
    $columns = [ map {
51
        {
51
        {
52
            cannot_be_toggled => exists $_->{cannot_be_toggled} ? $_->{cannot_be_toggled} : 0,
52
            cannot_be_toggled => exists $_->{cannot_be_toggled} ? $_->{cannot_be_toggled} : 0,
53
            cannot_be_modified => exists $_->{cannot_be_modified} ? $_->{cannot_be_modified} : 0,
53
            is_hidden => exists $_->{is_hidden} ? $_->{is_hidden} : 0,
54
            is_hidden => exists $_->{is_hidden} ? $_->{is_hidden} : 0,
54
            columnname => $_->{columnname},
55
            columnname => $_->{columnname},
55
        }
56
        }
Lines 69-74 sub get_modules { Link Here
69
        @{ $list->{modules}{ $c->module }{ $c->page }{ $c->tablename } };
70
        @{ $list->{modules}{ $c->module }{ $c->page }{ $c->tablename } };
70
        $column->{is_hidden}         = $c->is_hidden;
71
        $column->{is_hidden}         = $c->is_hidden;
71
        $column->{cannot_be_toggled} = $c->cannot_be_toggled;
72
        $column->{cannot_be_toggled} = $c->cannot_be_toggled;
73
        $column->{cannot_be_modified} = 0
74
            unless exists $column->{cannot_be_modified};
72
    }
75
    }
73
76
74
    return $list->{modules};
77
    return $list->{modules};
(-)a/t/db_dependent/ColumnsSettings.t (-1 / +5 lines)
Lines 133-158 my $modules_expected = { Link Here
133
                {
133
                {
134
                    columnname => 'symbol',
134
                    columnname => 'symbol',
135
                    cannot_be_toggled  => 0,
135
                    cannot_be_toggled  => 0,
136
                    cannot_be_modified => 0,
136
                    is_hidden  => 0,
137
                    is_hidden  => 0,
137
                },
138
                },
138
                {
139
                {
139
                    columnname => 'iso_code',
140
                    columnname => 'iso_code',
140
                    cannot_be_toggled  => 0,
141
                    cannot_be_toggled  => 0,
142
                    cannot_be_modified => 0,
141
                    is_hidden  => 0,
143
                    is_hidden  => 0,
142
                },
144
                },
143
                {
145
                {
144
                    columnname => 'last_updated',
146
                    columnname => 'last_updated',
145
                    cannot_be_toggled  => 0,
147
                    cannot_be_toggled  => 0,
148
                    cannot_be_modified => 0,
146
                    is_hidden  => 0,
149
                    is_hidden  => 0,
147
                },
150
                },
148
                {
151
                {
149
                    columnname => 'active',
152
                    columnname => 'active',
150
                    cannot_be_toggled  => 0,
153
                    cannot_be_toggled  => 0,
154
                    cannot_be_modified => 0,
151
                    is_hidden  => 1,
155
                    is_hidden  => 1,
152
                },
156
                },
153
                {
157
                {
154
                    columnname        => 'actions',
158
                    columnname        => 'actions',
155
                    cannot_be_toggled => 1,
159
                    cannot_be_toggled => 1,
160
                    cannot_be_modified => 0,
156
                    is_hidden  => 0,
161
                    is_hidden  => 0,
157
                },
162
                },
158
            ]
163
            ]
159
- 

Return to bug 16177