Modified the dialog to mirror the login dialog
authorAlexander Ebert <ebert@woltlab.com>
Fri, 26 Feb 2021 18:15:20 +0000 (19:15 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 26 Feb 2021 18:15:20 +0000 (19:15 +0100)
com.woltlab.wcf/templates/__reauthenticationLoginAs.tpl
wcfsetup/install/files/acp/templates/__devtoolsLanguageChooser.tpl
wcfsetup/install/files/acp/templates/__reauthenticationLoginAs.tpl
wcfsetup/install/files/acp/templates/header.tpl
wcfsetup/install/files/acp/templates/pageMenu.tpl
wcfsetup/install/files/acp/templates/reauthentication.tpl
wcfsetup/install/files/lib/form/ReauthenticationForm.class.php
wcfsetup/install/lang/de.xml

index e4e29a800b4bc6b843a8d17ee1600f9c44873fb2..a3d90a63927085d9f1df67be346a709dfbfb8f41 100644 (file)
@@ -1,4 +1,9 @@
 <dl>
        <dt>{lang}wcf.user.reauthentication.loginAs{/lang}</dt>
-       <dd>{$__wcf->user->username}</dd>
+       <dd>
+               {$__wcf->user->username}
+
+               {* This field is required to assist password managers. *}
+               <input type="text" autocomplete="username" value="{$__wcf->user->username}" style="display: none">
+       </dd>
 </dl>
index fe8e59f50bff6b2b74f4f0904f51391124d62925..2f2b91ff266a691504950c16856fbb57dd658aa1 100644 (file)
@@ -1,4 +1,4 @@
-{if ENABLE_DEBUG_MODE && ENABLE_DEVELOPER_TOOLS && $__wcf->user->userID}
+{if ENABLE_DEBUG_MODE && ENABLE_DEVELOPER_TOOLS && $__wcf->user->userID && $__isLogin|empty}
        <script data-relocate="true">
                require(['Ajax', 'WoltLabSuite/Core/Language/Chooser'], function(Ajax, LanguageChooser) {
                        var item = elCreate('li');
index 2072f2c749e581f9453d27786f79e8d73700ad39..970e4d2951ee86af9f0627fb401f5c53773cbd93 100644 (file)
@@ -3,5 +3,8 @@
        <dd>
                {$__wcf->user->username}
                <small>{lang}wcf.user.reauthentication.logoutAndChangeUser{/lang}</small>
+
+               {* This field is required to assist password managers. *}
+               <input type="text" autocomplete="username" value="{$__wcf->user->username}" style="display: none">
        </dd>
 </dl>
index 44de63ea214b4d2add0088fd5c449bda518a56e7..85f8003afba1422e59769151ff859a4718ffad9e 100644 (file)
                $(function() {
                        if (jQuery.browser.touch) $('html').addClass('touch');
                        
-                       {if $__wcf->user->userID}
+                       {if $__wcf->user->userID && $__isLogin|empty}
                                new WCF.ACP.Search();
                        {/if}
                        
                        {if $_sectionMenuItem->menuItem|in_array:$_activeMenuItems}{assign var=_acpPageSubMenuActive value=true}{/if}
                {/foreach}
        {/if}
-       <div id="pageContainer" class="pageContainer{if !PACKAGE_ID || !$__wcf->user->userID} acpPageHiddenMenu{elseif $_acpPageSubMenuActive} acpPageSubMenuActive{/if}">
+       <div id="pageContainer" class="pageContainer{if !PACKAGE_ID || !$__wcf->user->userID || !$__isLogin|empty} acpPageHiddenMenu{elseif $_acpPageSubMenuActive} acpPageSubMenuActive{/if}">
                {event name='beforePageHeader'}
                
                {include file='pageHeader'}
index f201ce261f47d1612bccbc3fa20651dda47b9c4f..832f4c1058c93872d86327de3e02e49446ee0805 100644 (file)
@@ -1,4 +1,4 @@
-{if PACKAGE_ID && $__wcf->user->userID}
+{if PACKAGE_ID && $__wcf->user->userID && $__isLogin|empty}
        {assign var=_activeMenuItems value=$__wcf->getACPMenu()->getActiveMenuItems()}
        
        <nav id="acpPageMenu" class="acpPageMenu">
index 645830a59d9b324d6ab2187009d84b574240767a..996535ac2e2267fe82d4427667b8134cf865de00 100644 (file)
@@ -1,5 +1,6 @@
-{include file='header' pageTitle='wcf.user.reauthentication'}
+{include file='header' pageTitle='wcf.user.reauthentication' __isLogin=true}
 
+{*
 <header class="contentHeader">
        <div class="contentHeaderTitle">
                <h1 class="contentTitle">{lang}wcf.user.reauthentication{/lang}</h1>
@@ -7,7 +8,24 @@
 </header>
 
 <p class="info" role="status">{lang}wcf.user.reauthentication.explanation{/lang}</p>
+*}
 
-{@$form->getHtml()}
+<div id="reauthentication" style="display: none">
+       {@$form->getHtml()}
+</div>
+
+<script data-relocate="true">
+       require(["WoltLabSuite/Core/Ui/Dialog"], (UiDialog) => {
+               UiDialog.openStatic("reauthentication", null, {
+                       closable: false,
+                       title: '{lang}wcf.user.reauthentication{/lang}',
+                       onShow() {
+                               setTimeout(() => {
+                                       document.getElementById("password").focus();
+                               }, 2);
+                       }
+               });
+       });
+</script>
 
 {include file='footer'}
index 0de68282cf6e19333f4780d9db8d0323c10e7973..067c3c9457f475f33d2d7ddd012b08b97e8d1bd6 100644 (file)
@@ -69,6 +69,7 @@ class ReauthenticationForm extends AbstractFormBuilderForm
                 ->templateName('__reauthenticationLoginAs'),
             UserPasswordField::create()
                 ->required()
+                ->autocomplete('current-password')
                 ->autoFocus(),
         ]);
     }
index 7e2500da270d63961384393b20cb8ef6d4f6c76b..93aa7e02307e72d11793da2214fd7b7a83b1b25f 100644 (file)
@@ -4795,7 +4795,7 @@ sich{/if} nicht bei uns registriert {if LANGUAGE_USE_INFORMAL_VARIANT}hast{else}
                <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 Kennworts erneut authentifizieren.{/if}]]></item>
-               <item name="wcf.user.reauthentication.loginAs"><![CDATA[Eingeloggt als]]></item>
+               <item name="wcf.user.reauthentication.loginAs"><![CDATA[Angemeldet als]]></item>
                <item name="wcf.user.reauthentication.logoutAndChangeUser"><![CDATA[Nicht {$__wcf->user->username}? <a href="{link controller='FullLogout' application='wcf'}t={csrfToken type='url'}{/link}">Abmelden und Benutzer wechseln</a>.]]></item>
        </category>
        <category name="wcf.user.menu">