From: Matthias Schmidt Date: Sun, 25 Aug 2019 13:37:21 +0000 (+0200) Subject: Use fixed maximum length for email form field X-Git-Tag: 5.2.0_Beta_1~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=49072d790b460fa63e9e1a6b5643bd5ad0c528dc;p=GitHub%2FWoltLab%2FWCF.git Use fixed maximum length for email form field See 1be4eb3a5779c73f5e34b57775fbba19faccff10 --- diff --git a/com.woltlab.wcf/templates/__emailFormField.tpl b/com.woltlab.wcf/templates/__emailFormField.tpl index 8b22d9b50f..7f62e54a92 100644 --- a/com.woltlab.wcf/templates/__emailFormField.tpl +++ b/com.woltlab.wcf/templates/__emailFormField.tpl @@ -4,11 +4,11 @@ *}id="{@$field->getPrefixedId()}" {* *}name="{@$field->getPrefixedId()}" {* *}value="{if !$field->isI18n() || !$field->hasI18nValues()}{$field->getValue()}{/if}" {* - *}class="long"{* + *}class="long" {* + *}maxlength="191"{* *}{if $field->isAutofocused()} autofocus{/if}{* *}{if $field->isRequired()} required{/if}{* *}{if $field->isImmutable()} disabled{/if}{* - *}{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}{* *}> diff --git a/wcfsetup/install/files/acp/templates/__emailFormField.tpl b/wcfsetup/install/files/acp/templates/__emailFormField.tpl index 8b22d9b50f..7f62e54a92 100644 --- a/wcfsetup/install/files/acp/templates/__emailFormField.tpl +++ b/wcfsetup/install/files/acp/templates/__emailFormField.tpl @@ -4,11 +4,11 @@ *}id="{@$field->getPrefixedId()}" {* *}name="{@$field->getPrefixedId()}" {* *}value="{if !$field->isI18n() || !$field->hasI18nValues()}{$field->getValue()}{/if}" {* - *}class="long"{* + *}class="long" {* + *}maxlength="191"{* *}{if $field->isAutofocused()} autofocus{/if}{* *}{if $field->isRequired()} required{/if}{* *}{if $field->isImmutable()} disabled{/if}{* - *}{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}{* *}> diff --git a/wcfsetup/install/files/lib/system/form/builder/field/EmailFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/EmailFormField.class.php index 204ee60ea2..23ae6506a1 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/EmailFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/EmailFormField.class.php @@ -1,7 +1,6 @@ $language] )); } - else { - $this->validateMaximumLength( - $email, - $language, - 'wcf.form.field.email.error.maximumLength' - ); - } } }