Add explanatory texts to reauthentication
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 7 Dec 2020 10:24:56 +0000 (11:24 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 7 Dec 2020 10:25:53 +0000 (11:25 +0100)
com.woltlab.wcf/templates/__reauthenticationLoginAs.tpl [new file with mode: 0644]
com.woltlab.wcf/templates/reauthentication.tpl
syncTemplates.json
wcfsetup/install/files/acp/templates/__reauthenticationLoginAs.tpl [new file with mode: 0644]
wcfsetup/install/files/acp/templates/reauthentication.tpl
wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php
wcfsetup/install/files/lib/form/ReauthenticationForm.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

diff --git a/com.woltlab.wcf/templates/__reauthenticationLoginAs.tpl b/com.woltlab.wcf/templates/__reauthenticationLoginAs.tpl
new file mode 100644 (file)
index 0000000..e4e29a8
--- /dev/null
@@ -0,0 +1,4 @@
+<dl>
+       <dt>{lang}wcf.user.reauthentication.loginAs{/lang}</dt>
+       <dd>{$__wcf->user->username}</dd>
+</dl>
index 02b1ef733d6e3334b43efff799cbb87815f13bb0..a00e19fe146ef416714c35c5ff0437397e5d932e 100644 (file)
@@ -1,5 +1,7 @@
 {include file='header' __disableAds=true}
 
+<p class="info" role="status">{lang}wcf.user.reauthentication.explanation{/lang}</p>
+
 {@$form->getHtml()}
 
 {include file='footer' __disableAds=true}
index 63a95e31a0a3f1753ddb1df75aa25fbe3c6a3e3e..cc632327cbc33d84972416ffa2a721cd9b70a2e6 100644 (file)
@@ -38,6 +38,7 @@
     "__pollOptionsFormField",
     "__radioButtonFormField",
     "__ratingFormField",
+    "__reauthenticationLoginAs",
     "__rowFormContainer",
     "__rowFormFieldContainer",
     "__singleMediaSelectionFormField",
diff --git a/wcfsetup/install/files/acp/templates/__reauthenticationLoginAs.tpl b/wcfsetup/install/files/acp/templates/__reauthenticationLoginAs.tpl
new file mode 100644 (file)
index 0000000..e4e29a8
--- /dev/null
@@ -0,0 +1,4 @@
+<dl>
+       <dt>{lang}wcf.user.reauthentication.loginAs{/lang}</dt>
+       <dd>{$__wcf->user->username}</dd>
+</dl>
index 4a682a73b09842ad9ef2592d6bbafcabaac64ec1..645830a59d9b324d6ab2187009d84b574240767a 100644 (file)
@@ -6,6 +6,8 @@
        </div>
 </header>
 
+<p class="info" role="status">{lang}wcf.user.reauthentication.explanation{/lang}</p>
+
 {@$form->getHtml()}
 
 {include file='footer'}
index 5e17a05130b2ac8f049cc32fda53b76730118bc0..f225565d45ff65bdda5645b1e49a8a774cf62fff 100644 (file)
@@ -121,7 +121,6 @@ class MultifactorAuthenticationForm extends AbstractFormBuilderForm {
                
                $this->form->appendChild(
                        TemplateFormNode::create('loginAs')
-                               ->application('wcf')
                                ->templateName('__multifactorAuthenticationLoginAs')
                );
                
index 2de11450e4b32b7e329a05896328275d11005778..ee9c1f301e406a47a24e6801dad8ce4018f3a63e 100644 (file)
@@ -4,6 +4,7 @@ use wcf\form\AbstractFormBuilderForm;
 use wcf\system\application\ApplicationHandler;
 use wcf\system\exception\IllegalLinkException;
 use wcf\system\form\builder\field\user\UserPasswordField;
+use wcf\system\form\builder\TemplateFormNode;
 use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\HeaderUtil;
@@ -54,10 +55,12 @@ class ReauthenticationForm extends AbstractFormBuilderForm {
        protected function createForm() {
                parent::createForm();
                
-               $this->form->appendChild(
+               $this->form->appendChildren([
+                       TemplateFormNode::create('loginAs')
+                               ->templateName('__reauthenticationLoginAs'),
                        UserPasswordField::create()
                                ->required(),
-               );
+               ]);
        }
        
        /**
index f46ae2e50306dc34ec1c19f25244421bd3b8e510..6d8ed35bcc182a20c613cdffe89b63b157600049 100644 (file)
@@ -4747,6 +4747,8 @@ sich{/if} nicht bei uns registriert {if LANGUAGE_USE_INFORMAL_VARIANT}hast{else}
                <item name="wcf.user.status.isDisabled"><![CDATA[Der Benutzer ist nicht freigeschaltet.]]></item>
                <item name="wcf.user.status.blacklistMatches"><![CDATA[Der Benutzer wurde aufgrund eines Treffers in der Datenbank von „Stop Forum Spam“ automatisch deaktiviert (Übereinstimmungen: {implode glue=', ' from=$user->getBlacklistMatchesTitle() item=matchLabel}{$matchLabel}{/implode}).]]></item>
                <item name="wcf.user.reauthentication"><![CDATA[Erneute Authentifizierung]]></item>
+               <item name="wcf.user.reauthentication.explanation"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Du betrittst einen besonders geschützten Bereich. Aus Sicherheitsgründen ist es notwendig, dass du dich durch Eingabe deines Kennworts erneut authentifizierst.{else}Sie betreten einen besonders geschützten Bereich. Aus Sicherheitsgründen ist es notwendig, dass Sie sich durch Eingabe Ihres Kenntworts erneut authentifizieren.{/if}]]></item>
+               <item name="wcf.user.reauthentication.loginAs"><![CDATA[Eingeloggt als]]></item>
        </category>
        <category name="wcf.user.menu">
                <item name="wcf.user.menu.community"><![CDATA[Community]]></item>
index e2e45e7190ab0cd23d13171d9b57b0e5a0e153d2..b51a604d259bda9c715d146ce53e648c7c0ca377 100644 (file)
@@ -4745,6 +4745,8 @@ not register with us.]]></item>
                <item name="wcf.user.status.isDisabled"><![CDATA[The user has not been approved yet.]]></item>
                <item name="wcf.user.status.blacklistMatches"><![CDATA[The user has been automatically disabled because of matches in the “Stop Forum Spam” database (Matches: {implode glue=', ' from=$user->getBlacklistMatchesTitle() item=matchLabel}{$matchLabel}{/implode}).]]></item>
                <item name="wcf.user.reauthentication"><![CDATA[Re-authentication]]></item>
+               <item name="wcf.user.reauthentication.explanation"><![CDATA[You are entering a security-sensitive area. For security reasons it is required that you re-authenticate yourself by entering your password.]]></item>
+               <item name="wcf.user.reauthentication.loginAs"><![CDATA[Logged in as]]></item>
        </category>
        <category name="wcf.user.menu">
                <item name="wcf.user.menu.community"><![CDATA[Community]]></item>