Add pattern support for `MultilineTextFormField`
authorMatthias Schmidt <gravatronics@live.com>
Tue, 22 Dec 2020 13:04:31 +0000 (14:04 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 22 Dec 2020 13:04:31 +0000 (14:04 +0100)
Textareas do not support `pattern` but as `MultilineTextFormField` extends `TextFormField`, pattern support is passed down to `MultilineTextFormField`.

com.woltlab.wcf/templates/__multilineTextFormField.tpl
wcfsetup/install/files/acp/templates/__multilineTextFormField.tpl

index ef6fce19cbb78ec4e02ef5d277fd240a78db8c07..acad308507010c3c8aca5f12f2c3350efd07c67b 100644 (file)
@@ -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}{*
index ef6fce19cbb78ec4e02ef5d277fd240a78db8c07..acad308507010c3c8aca5f12f2c3350efd07c67b 100644 (file)
@@ -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}{*