From: Tim Düsterhus Date: Mon, 14 Dec 2020 09:42:49 +0000 (+0100) Subject: Use LanguageItemFormNode in EmailMultifactorMethod X-Git-Tag: 5.4.0_Alpha_1~543^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=777b6b9f3a983b705d150646080614450ce67887;p=GitHub%2FWoltLab%2FWCF.git Use LanguageItemFormNode in EmailMultifactorMethod --- 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')