From 146e7acb8a1b825b12ff488c13e9175de2a35c11 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 22 Dec 2020 14:04:31 +0100 Subject: [PATCH] Add pattern support for `MultilineTextFormField` Textareas do not support `pattern` but as `MultilineTextFormField` extends `TextFormField`, pattern support is passed down to `MultilineTextFormField`. --- com.woltlab.wcf/templates/__multilineTextFormField.tpl | 1 + .../install/files/acp/templates/__multilineTextFormField.tpl | 1 + 2 files changed, 2 insertions(+) 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}{* -- 2.20.1