From: Matthias Schmidt Date: Tue, 22 Dec 2020 13:04:31 +0000 (+0100) Subject: Add pattern support for `MultilineTextFormField` X-Git-Tag: 5.4.0_Alpha_1~515^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=146e7acb8a1b825b12ff488c13e9175de2a35c11;p=GitHub%2FWoltLab%2FWCF.git Add pattern support for `MultilineTextFormField` Textareas do not support `pattern` but as `MultilineTextFormField` extends `TextFormField`, pattern support is passed down to `MultilineTextFormField`. --- diff --git a/com.woltlab.wcf/templates/__multilineTextFormField.tpl b/com.woltlab.wcf/templates/__multilineTextFormField.tpl index ef6fce19cb..acad308507 100644 --- a/com.woltlab.wcf/templates/__multilineTextFormField.tpl +++ b/com.woltlab.wcf/templates/__multilineTextFormField.tpl @@ -3,6 +3,7 @@ *}rows="{@$field->getRows()}"{* *}{if !$field->getFieldClasses()|empty} class="{implode from=$field->getFieldClasses() item='class' glue=' '}{$class}{/implode}"{/if}{* *}{if $field->getAutoComplete() !== null} autocomplete="{$field->getAutoComplete()}"{/if}{* + *}{if $field->getPattern() !== null} pattern="{$field->getPattern()}"{/if}{* *}{if $field->isAutofocused()} autofocus{/if}{* *}{if $field->isRequired()} required{/if}{* *}{if $field->isImmutable()} disabled{/if}{* diff --git a/wcfsetup/install/files/acp/templates/__multilineTextFormField.tpl b/wcfsetup/install/files/acp/templates/__multilineTextFormField.tpl index ef6fce19cb..acad308507 100644 --- a/wcfsetup/install/files/acp/templates/__multilineTextFormField.tpl +++ b/wcfsetup/install/files/acp/templates/__multilineTextFormField.tpl @@ -3,6 +3,7 @@ *}rows="{@$field->getRows()}"{* *}{if !$field->getFieldClasses()|empty} class="{implode from=$field->getFieldClasses() item='class' glue=' '}{$class}{/implode}"{/if}{* *}{if $field->getAutoComplete() !== null} autocomplete="{$field->getAutoComplete()}"{/if}{* + *}{if $field->getPattern() !== null} pattern="{$field->getPattern()}"{/if}{* *}{if $field->isAutofocused()} autofocus{/if}{* *}{if $field->isRequired()} required{/if}{* *}{if $field->isImmutable()} disabled{/if}{*