From: Matthias Schmidt Date: Wed, 23 Dec 2020 14:45:38 +0000 (+0100) Subject: Add field attribute support for `UsernameFormField` X-Git-Tag: 5.4.0_Alpha_1~507^2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a02d508e59b0df4d4f845ef41e952d4e96c5cf2;p=GitHub%2FWoltLab%2FWCF.git Add field attribute support for `UsernameFormField` --- diff --git a/com.woltlab.wcf/templates/__usernameFormField.tpl b/com.woltlab.wcf/templates/__usernameFormField.tpl index 63dc44d048..feee394760 100644 --- a/com.woltlab.wcf/templates/__usernameFormField.tpl +++ b/com.woltlab.wcf/templates/__usernameFormField.tpl @@ -11,4 +11,6 @@ *}{if $field->getMaximumLength() !== null} maxlength="{$field->getMaximumLength()}"{/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/__usernameFormField.tpl b/wcfsetup/install/files/acp/templates/__usernameFormField.tpl index 63dc44d048..feee394760 100644 --- a/wcfsetup/install/files/acp/templates/__usernameFormField.tpl +++ b/wcfsetup/install/files/acp/templates/__usernameFormField.tpl @@ -11,4 +11,6 @@ *}{if $field->getMaximumLength() !== null} maxlength="{$field->getMaximumLength()}"{/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/UsernameFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/user/UsernameFormField.class.php index b13a86d8d4..50205349cd 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/user/UsernameFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/user/UsernameFormField.class.php @@ -1,6 +1,7 @@