Remove validation attributes from __sourceCodeFormField.tpl
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 4 May 2022 13:27:22 +0000 (15:27 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 4 May 2022 13:28:55 +0000 (15:28 +0200)
These are not supported with CodeMirror, because it only syncs the entered data
upon `submit()` which notably runs *after* validation.

see codemirror/CodeMirror#5092
Fixes #4732

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

index 6fbf197580e76994c5eccd799dc11540ac806c0b..c6114961a2a6d3817cc2e89d6c7b180117d72582 100644 (file)
@@ -1,11 +1,8 @@
 <textarea id="{@$field->getPrefixedId()}" {*
     *}name="{@$field->getPrefixedId()}" {*
     *}{if !$field->getFieldClasses()|empty} class="{implode from=$field->getFieldClasses() item='class' glue=' '}{$class}{/implode}"{/if}{*
-    *}{if $field->isRequired()} required{/if}{*
     *}{if $field->isAutofocused()} autofocus{/if}{*
     *}{if $field->isImmutable()} disabled{/if}{*
-    *}{if $field->getMinimumLength() !== null} minlength="{$field->getMinimumLength()}"{/if}{*
-    *}{if $field->getMaximumLength() !== null} maxlength="{$field->getMaximumLength()}"{/if}{*
     *}{foreach from=$field->getFieldAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{*
 *}>{$field->getValue()}</textarea>
 
index 6fbf197580e76994c5eccd799dc11540ac806c0b..c6114961a2a6d3817cc2e89d6c7b180117d72582 100644 (file)
@@ -1,11 +1,8 @@
 <textarea id="{@$field->getPrefixedId()}" {*
     *}name="{@$field->getPrefixedId()}" {*
     *}{if !$field->getFieldClasses()|empty} class="{implode from=$field->getFieldClasses() item='class' glue=' '}{$class}{/implode}"{/if}{*
-    *}{if $field->isRequired()} required{/if}{*
     *}{if $field->isAutofocused()} autofocus{/if}{*
     *}{if $field->isImmutable()} disabled{/if}{*
-    *}{if $field->getMinimumLength() !== null} minlength="{$field->getMinimumLength()}"{/if}{*
-    *}{if $field->getMaximumLength() !== null} maxlength="{$field->getMaximumLength()}"{/if}{*
     *}{foreach from=$field->getFieldAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{*
 *}>{$field->getValue()}</textarea>