From f66ab8dae2f3d0418759f81a3a64dc9517a62449 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:17:31 +0200 Subject: Adding upstream version 1.10.2. Signed-off-by: Daniel Baumann --- application/forms/IcingaForgetApiKeyForm.php | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 application/forms/IcingaForgetApiKeyForm.php (limited to 'application/forms/IcingaForgetApiKeyForm.php') diff --git a/application/forms/IcingaForgetApiKeyForm.php b/application/forms/IcingaForgetApiKeyForm.php new file mode 100644 index 0000000..d1f475c --- /dev/null +++ b/application/forms/IcingaForgetApiKeyForm.php @@ -0,0 +1,34 @@ +host = $host; + return $this; + } + + public function setup() + { + $this->addStandaloneSubmitButton(sprintf( + $this->translate('Drop Self Service API key'), + $this->host->getObjectName() + )); + } + + public function onSuccess() + { + $this->host->set('api_key', null)->store(); + $this->redirectOnSuccess(sprintf($this->translate( + 'The Self Service API key for %s has been dropped' + ), $this->host->getObjectName())); + } +} -- cgit v1.2.3