mirror of
https://github.com/Icinga/icingaweb2.git
synced 2026-06-08 16:12:43 -04:00
Add module class to 2FA config fieldset in TwoFactorEnrollmentForm
The `icinga-module module-{name}` class pair lets the providing module scope
its CSS to its own fieldset without affecting other form elements.
This commit is contained in:
parent
0adc5543a1
commit
8e8d30990b
1 changed files with 8 additions and 1 deletions
|
|
@ -5,12 +5,14 @@
|
|||
|
||||
namespace Icinga\Forms\Account;
|
||||
|
||||
use Icinga\Application\ClassLoader;
|
||||
use Icinga\Application\Hook\TwoFactorHook;
|
||||
use Icinga\Authentication\Auth;
|
||||
use Icinga\Authentication\TwoFactor;
|
||||
use Icinga\Web\Notification;
|
||||
use Icinga\Web\RememberMe;
|
||||
use Icinga\Web\Session;
|
||||
use ipl\Html\Attributes;
|
||||
use ipl\Html\FormElement\FieldsetElement;
|
||||
use ipl\Web\Common\CsrfCounterMeasure;
|
||||
use ipl\Web\Common\FormUid;
|
||||
|
|
@ -72,7 +74,12 @@ class TwoFactorEnrollmentForm extends CompatForm
|
|||
return;
|
||||
}
|
||||
|
||||
$configFieldset = new FieldsetElement($twoFactor->getName());
|
||||
$configFieldset = new FieldsetElement(
|
||||
$twoFactor->getName(),
|
||||
Attributes::create([
|
||||
'class' => 'icinga-module module-' . ClassLoader::extractModuleName(get_class($twoFactor))
|
||||
])
|
||||
);
|
||||
$this->addElement($configFieldset);
|
||||
$twoFactor->assembleEnrollmentFormElements($configFieldset);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue