icingadb-web/application/forms/SetAsBackendForm.php
Sukhwinder Dhillon f0d0989332 migrate popup: Add checkbox to set icingadb as backend
This checkbox is only displayed in modules that support icingadb.
2021-11-11 09:08:16 +01:00

28 lines
680 B
PHP

<?php
/* Icinga DB Web | (c) 2021 Icinga GmbH | GPLv2 */
namespace Icinga\Module\Icingadb\Forms;
class SetAsBackendForm extends SetAsBackendConfigForm
{
public function init()
{
$this->setName('IcingaModuleIcingadbFormsSetAsBackendForm');
$this->setTokenDisabled();
// If you change name here, please change in migration.js also.
}
public function createElements(array $formData)
{
parent::createElements([]);
$this->removeElement('btn_submit');
$this->removeElement('btn_submit_session');
}
public function onSuccess()
{
$this->save($this->getElement('backend')->isChecked());
}
}