Better solution for #150

This commit is contained in:
djmaze 2021-10-04 13:53:59 +02:00
parent db8ba85350
commit 7ede8eeb4a
4 changed files with 6 additions and 6 deletions

View file

@ -6,8 +6,8 @@ class TwoFactorAuthPlugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = 'Two Factor Authentication',
VERSION = '2.1',
RELEASE = '2021-07-28',
VERSION = '2.2',
RELEASE = '2021-10-04',
REQUIRED = '2.6.0',
CATEGORY = 'Login',
DESCRIPTION = 'Provides support for TOTP 2FA';

View file

@ -2,7 +2,7 @@
(rl => {
rl && addEventListener('rl-view-model', e => {
if (e.detail && 'Login' === e.detail.templateId) {
if (e.detail && 'Login' === (e.detail.templateId || e.detail.viewModelTemplateID)) {
const container = e.detail.viewModelDom.querySelector('#plugin-Login-BottomControlGroup'),
placeholder = 'LOGIN/LABEL_TWO_FACTOR_CODE';
if (container) {