icingaweb2-module-director/library/Director/Web/Form/ClickHereForm.php

32 lines
572 B
PHP
Raw Permalink Normal View History

2022-07-01 02:36:01 -04:00
<?php
namespace Icinga\Module\Director\Web\Form;
use ipl\I18n\Translation;
2022-07-01 02:36:01 -04:00
use gipfl\Web\InlineForm;
class ClickHereForm extends InlineForm
{
use Translation;
2022-07-01 02:36:01 -04:00
protected $hasBeenClicked = false;
protected function assemble()
{
$this->addElement('submit', 'submit', [
'label' => $this->translate('here'),
'class' => 'link-button'
]);
}
public function hasBeenClicked()
{
return $this->hasBeenClicked;
}
public function onSuccess()
{
$this->hasBeenClicked = true;
}
}