Bug 31435: Tie 'Configure' to table_settings

This patch adds a check for table_settings to prevent the display of
'Configure this table' when table settings are not passed to the
datatable wrapper.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Suggested test plan:
* Without patch:
* Go to Administration > SMTP servers
* Verify the configure button shows, but doesn't work
* Apply patch
* Reload the SMTP servers page
* The configure button will no longer show

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2022-08-22 08:15:34 +01:00 committed by Tomas Cohen Arazi
parent ce1efe7de0
commit 37c5cfb258
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 2 additions and 2 deletions

View file

@ -161,7 +161,7 @@ function KohaTable(id_selector, dt_parameters, table_settings, add_filters) {
}
);
if ( CAN_user_parameters_manage_column_config ) {
if ( table_settings && CAN_user_parameters_manage_column_config ) {
dt_parameters[ "buttons" ].push(
{
className: "dt_button_configure_table",

View file

@ -813,7 +813,7 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
}
);
if ( CAN_user_parameters_manage_column_config ) {
if ( table_settings && CAN_user_parameters_manage_column_config ) {
settings[ "buttons" ].push(
{
className: "dt_button_configure_table",