*}name="{@$field->getPrefixedId()}" {*
*}value="{$field->getValue()}" {*
*}class="long"{*
+ *}{if $field->getAutoComplete() !== null} autocomplete="{$field->getAutoComplete()}"{/if}{*
*}{if $field->isAutofocused()} autofocus{/if}{*
*}{if $field->isRequired()} required{/if}{*
*}{if $field->getPlaceholder() !== null} placeholder="{$field->getPlaceholder()}"{/if}{*
*}name="{@$field->getPrefixedId()}" {*
*}value="{$field->getValue()}" {*
*}class="long"{*
+ *}{if $field->getAutoComplete() !== null} autocomplete="{$field->getAutoComplete()}"{/if}{*
*}{if $field->isAutofocused()} autofocus{/if}{*
*}{if $field->isRequired()} required{/if}{*
*}{if $field->getPlaceholder() !== null} placeholder="{$field->getPlaceholder()}"{/if}{*
<?php
namespace wcf\system\form\builder\field\user;
use wcf\system\form\builder\field\AbstractFormField;
+use wcf\system\form\builder\field\IAutoCompleteFormField;
use wcf\system\form\builder\field\IAutoFocusFormField;
use wcf\system\form\builder\field\IPlaceholderFormField;
+use wcf\system\form\builder\field\TAutoCompleteFormField;
use wcf\system\form\builder\field\TAutoFocusFormField;
use wcf\system\form\builder\field\TDefaultIdFormField;
use wcf\system\form\builder\field\TPlaceholderFormField;
* @package WoltLabSuite\Core\System\Form\Builder\Field\User
* @since 5.4
*/
-class UserPasswordField extends AbstractFormField implements IAutoFocusFormField, IPlaceholderFormField {
+class UserPasswordField extends AbstractFormField implements IAutoCompleteFormField, IAutoFocusFormField, IPlaceholderFormField {
+ use TAutoCompleteFormField;
use TAutoFocusFormField;
use TDefaultIdFormField;
use TPlaceholderFormField;
return 'password';
}
+ /**
+ * @inheritDoc
+ * @since 5.4
+ */
+ protected function getValidAutoCompleteTokens(): array {
+ return ['current-password'];
+ }
+
/**
* @inheritDoc
*/