From 49072d790b460fa63e9e1a6b5643bd5ad0c528dc Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 25 Aug 2019 15:37:21 +0200 Subject: [PATCH] Use fixed maximum length for email form field See 1be4eb3a5779c73f5e34b57775fbba19faccff10 --- com.woltlab.wcf/templates/__emailFormField.tpl | 4 ++-- .../install/files/acp/templates/__emailFormField.tpl | 4 ++-- .../form/builder/field/EmailFormField.class.php | 11 +---------- 3 files changed, 5 insertions(+), 14 deletions(-) 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' - ); - } } } -- 2.20.1