From 19b533172aa80b599792dcf8af0351138843b691 Mon Sep 17 00:00:00 2001 From: alaunois Date: Thu, 21 Oct 2021 15:40:28 +0200 Subject: [PATCH] fix(conf) remove option to enable one-click-export button (#10350) --- .../myAccount/formMyAccount.ihtml | 2 +- .../Administration/myAccount/formMyAccount.php | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/www/include/Administration/myAccount/formMyAccount.ihtml b/www/include/Administration/myAccount/formMyAccount.ihtml index 25d244e49cd..55a23835153 100644 --- a/www/include/Administration/myAccount/formMyAccount.ihtml +++ b/www/include/Administration/myAccount/formMyAccount.ihtml @@ -55,7 +55,7 @@ {$form.default_page.label}{$form.default_page.html} {$form.show_deprecated_pages.label}{$form.show_deprecated_pages.html} {$form.contact_js_effects.label}{$form.contact_js_effects.html} - {if $contactIsAdmin} + {if $contactIsAdmin && !$isRemote} {$form.enable_one_click_export.label}{$form.enable_one_click_export.html} {/if} diff --git a/www/include/Administration/myAccount/formMyAccount.php b/www/include/Administration/myAccount/formMyAccount.php index e358508b8ca..25558276250 100644 --- a/www/include/Administration/myAccount/formMyAccount.php +++ b/www/include/Administration/myAccount/formMyAccount.php @@ -138,13 +138,15 @@ $form->addElement('select', 'contact_lang', _("Language"), $langs); $form->addElement('checkbox', 'show_deprecated_pages', _("Use deprecated pages"), null, $attrsText); $form->addElement('checkbox', 'contact_js_effects', _("Animation effects"), null, $attrsText); -$form->addElement( - 'checkbox', - 'enable_one_click_export', - _("Enable the one-click export button for poller configuration [BETA]"), - null, - $attrsText -); +if (!$isRemote) { + $form->addElement( + 'checkbox', + 'enable_one_click_export', + _("Enable the one-click export button for poller configuration [BETA]"), + null, + $attrsText + ); +} /* ------------------------ Topoogy ---------------------------- */ @@ -451,6 +453,7 @@ function myReplace() $tpl->assign('o', $o); $tpl->assign('featuresFlipping', (count($features) > 0)); $tpl->assign('contactIsAdmin', $centreon->user->get_admin()); +$tpl->assign('isRemote', $isRemote); /* * prepare help texts