diff options
Diffstat (limited to '')
-rw-r--r-- | library/Director/Web/Form/ClickHereForm.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/library/Director/Web/Form/ClickHereForm.php b/library/Director/Web/Form/ClickHereForm.php new file mode 100644 index 0000000..abba9d7 --- /dev/null +++ b/library/Director/Web/Form/ClickHereForm.php @@ -0,0 +1,31 @@ +<?php + +namespace Icinga\Module\Director\Web\Form; + +use gipfl\Translation\TranslationHelper; +use gipfl\Web\InlineForm; + +class ClickHereForm extends InlineForm +{ + use TranslationHelper; + + 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; + } +} |