mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
Fix form with mulitple buttons doesn't recognize whether it's been submitted
This commit is contained in:
parent
192a21b668
commit
fdadba59ca
@ -18,6 +18,16 @@ class MigrationForm extends Form
|
|||||||
'name' => 'migration-form'
|
'name' => 'migration-form'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function hasBeenSubmitted(): bool
|
||||||
|
{
|
||||||
|
if (! $this->hasBeenSent()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$pressedButton = $this->getPressedSubmitElement();
|
||||||
|
return $pressedButton && strpos($pressedButton->getName(), 'migrate-') !== false;
|
||||||
|
}
|
||||||
|
|
||||||
protected function assemble(): void
|
protected function assemble(): void
|
||||||
{
|
{
|
||||||
$this->addHtml($this->createUidElement());
|
$this->addHtml($this->createUidElement());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user