From 777b6b9f3a983b705d150646080614450ce67887 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 14 Dec 2020 10:42:49 +0100 Subject: [PATCH] Use LanguageItemFormNode in EmailMultifactorMethod --- .../templates/multifactorManageEmail.tpl | 1 - .../multifactor/EmailMultifactorMethod.class.php | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 com.woltlab.wcf/templates/multifactorManageEmail.tpl diff --git a/com.woltlab.wcf/templates/multifactorManageEmail.tpl b/com.woltlab.wcf/templates/multifactorManageEmail.tpl deleted file mode 100644 index 156cd27bd6..0000000000 --- a/com.woltlab.wcf/templates/multifactorManageEmail.tpl +++ /dev/null @@ -1 +0,0 @@ -{lang}wcf.user.security.multifactor.email.enabled.description{/lang} diff --git a/wcfsetup/install/files/lib/system/user/multifactor/EmailMultifactorMethod.class.php b/wcfsetup/install/files/lib/system/user/multifactor/EmailMultifactorMethod.class.php index 58799f51a6..9d6c996847 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/EmailMultifactorMethod.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/EmailMultifactorMethod.class.php @@ -4,13 +4,12 @@ use wcf\system\background\BackgroundQueueHandler; use wcf\system\email\SimpleEmail; use wcf\system\flood\FloodControl; use wcf\system\form\builder\container\FormContainer; -use wcf\system\form\builder\CustomFormNode; use wcf\system\form\builder\field\ButtonFormField; use wcf\system\form\builder\field\TextFormField; use wcf\system\form\builder\field\validation\FormFieldValidationError; use wcf\system\form\builder\field\validation\FormFieldValidator; use wcf\system\form\builder\IFormDocument; -use wcf\system\form\builder\TemplateFormNode; +use wcf\system\form\builder\LanguageItemFormNode; use wcf\system\user\multifactor\email\CodeFormField; use wcf\system\WCF; @@ -49,8 +48,8 @@ class EmailMultifactorMethod implements IMultifactorMethod { $statusContainer = FormContainer::create('enabledContainer') ->label('wcf.user.security.multifactor.email.enabled') ->appendChildren([ - TemplateFormNode::create('enabled') - ->templateName('multifactorManageEmail'), + LanguageItemFormNode::create('enabled') + ->languageItem('wcf.user.security.multifactor.email.enabled.description'), ]); $form->appendChild($statusContainer); } @@ -58,10 +57,8 @@ class EmailMultifactorMethod implements IMultifactorMethod { $generateContainer = FormContainer::create('enableContainer') ->label('wcf.user.security.multifactor.email.enable') ->appendChildren([ - CustomFormNode::create('explanation') - ->content(WCF::getLanguage()->getDynamicVariable( - 'wcf.user.security.multifactor.email.enable.description' - )), + LanguageItemFormNode::create('explanation') + ->languageItem('wcf.user.security.multifactor.email.enable.description'), ButtonFormField::create('enable') ->buttonLabel('wcf.user.security.multifactor.email.enable') ->objectProperty('action') -- 2.20.1