From 6bb9a1c5c01e47958f7ca2c2b525e3a5b7869c40 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 23 Dec 2020 15:46:40 +0100 Subject: [PATCH] Add field attribute support for `UserPasswordField` --- com.woltlab.wcf/templates/__userPasswordFormField.tpl | 1 + .../install/files/acp/templates/__userPasswordFormField.tpl | 1 + .../form/builder/field/user/UserPasswordField.class.php | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/com.woltlab.wcf/templates/__userPasswordFormField.tpl b/com.woltlab.wcf/templates/__userPasswordFormField.tpl index a0a4594f1b..9eebaa0cc2 100644 --- a/com.woltlab.wcf/templates/__userPasswordFormField.tpl +++ b/com.woltlab.wcf/templates/__userPasswordFormField.tpl @@ -8,4 +8,5 @@ *}{if $field->isRequired()} required{/if}{* *}{if $field->getPlaceholder() !== null} placeholder="{$field->getPlaceholder()}"{/if}{* *}{if $field->getDocument()->isAjax()} data-dialog-submit-on-enter="true"{/if}{* + *}{foreach from=$field->getFieldAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{* *}> diff --git a/wcfsetup/install/files/acp/templates/__userPasswordFormField.tpl b/wcfsetup/install/files/acp/templates/__userPasswordFormField.tpl index a0a4594f1b..9eebaa0cc2 100644 --- a/wcfsetup/install/files/acp/templates/__userPasswordFormField.tpl +++ b/wcfsetup/install/files/acp/templates/__userPasswordFormField.tpl @@ -8,4 +8,5 @@ *}{if $field->isRequired()} required{/if}{* *}{if $field->getPlaceholder() !== null} placeholder="{$field->getPlaceholder()}"{/if}{* *}{if $field->getDocument()->isAjax()} data-dialog-submit-on-enter="true"{/if}{* + *}{foreach from=$field->getFieldAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{* *}> diff --git a/wcfsetup/install/files/lib/system/form/builder/field/user/UserPasswordField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/user/UserPasswordField.class.php index 669b068b55..1e9dd4625c 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/user/UserPasswordField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/user/UserPasswordField.class.php @@ -1,12 +1,14 @@