From 44be2d967f5d2ef8bad4d913784b2e0c8aef2000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be> Date: Tue, 11 Jul 2017 11:39:24 +0200 Subject: [PATCH] Fixes #5668 Removed useless max lengths --- ihtml/themes/breezy/login.tpl | 4 ++-- ihtml/themes/breezy/recovery.tpl | 2 +- include/class_filter.inc | 4 ++-- include/functions.inc | 2 +- include/simpleplugin/simple-filter.xml | 1 - 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ihtml/themes/breezy/login.tpl b/ihtml/themes/breezy/login.tpl index d28286544..4e72104c1 100644 --- a/ihtml/themes/breezy/login.tpl +++ b/ihtml/themes/breezy/login.tpl @@ -28,13 +28,13 @@ <label for="username"> <img class="center" src="{$personal_img|escape}" alt="{t}Username{/t}" title="{t}Username{/t}"/> </label> - <input type="text" name="username" id="username" maxlength="40" value="{$username|escape}" title="{t}Username{/t}" /> + <input type="text" name="username" id="username" value="{$username|escape}" title="{t}Username{/t}" /> <br /> <br /> <label for="password"> <img class="center" src="{$password_img|escape}" alt="{t}Password{/t}" title="{t}Password{/t}" /> </label> - <input type="password" name="password" id="password" maxlength="40" value="" title="{t}Password{/t}"/> + <input type="password" name="password" id="password" value="" title="{t}Password{/t}"/> <br /> <a href="recovery.php">{t}I forgot my password{/t}</a> </div> diff --git a/ihtml/themes/breezy/recovery.tpl b/ihtml/themes/breezy/recovery.tpl index 9c702f720..d8eab83c8 100644 --- a/ihtml/themes/breezy/recovery.tpl +++ b/ihtml/themes/breezy/recovery.tpl @@ -63,7 +63,7 @@ </tr> <tr> <td><label for="new_password_repeated">{t}New password repeated{/t}</label></td> - <td><input type="password" name="new_password_repeated" id="new_password_repeated" maxlength="40" value="" title="{t}New password repeated{/t}" /></td> + <td><input type="password" name="new_password_repeated" id="new_password_repeated" value="" title="{t}New password repeated{/t}" /></td> </tr> <tr> <td>{t}Password strength{/t}</td> diff --git a/include/class_filter.inc b/include/class_filter.inc index 4133687a9..3b5cea01f 100644 --- a/include/class_filter.inc +++ b/include/class_filter.inc @@ -151,11 +151,11 @@ class filter if (isset($element['size'])) { $size = $element['size']; } - $maxlength = 30; + $maxlength = ''; if (isset($element['maxlength'])) { $maxlength = $element['maxlength']; } - $result = "<input class='filter_textfield' id='$tag' name='$tag' type='text' size='$size' maxlength='{$maxlength}' value='".$this->elementValues[$tag]."'>"; + $result = '<input class="filter_textfield" id="'.$tag.'" name="'.$tag.'" type="text" size="'.$size.'"'.(empty($maxlength) ? '' : ' maxlength="'.$maxlength.'"').' value="'.$this->elementValues[$tag].'"/>'; if (isset($element['autocomplete'])) { $frequency = "0.5"; $characters = "1"; diff --git a/include/functions.inc b/include/functions.inc index 812bef3f7..00100589a 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -874,7 +874,7 @@ function check_sizelimit() $smarty = get_smarty(); $smarty->assign('warning', sprintf(_('The size limit of %d entries is exceed!'), session::global_get('size_limit'))); - $smarty->assign('limit_message', sprintf(_('Set the new size limit to %s and show me this message if the limit still exceeds'), '<input type="text" name="new_limit" maxlength="10" size="5" value="'.(session::global_get('size_limit') + 100).'">')); + $smarty->assign('limit_message', sprintf(_('Set the new size limit to %s and show me this message if the limit still exceeds'), '<input type="text" name="new_limit" maxlength="10" size="5" value="'.(session::global_get('size_limit') + 100).'"/>')); return $smarty->fetch(get_template_path('sizelimit.tpl')); } diff --git a/include/simpleplugin/simple-filter.xml b/include/simpleplugin/simple-filter.xml index 6a05ae2f0..9d7a49a17 100644 --- a/include/simpleplugin/simple-filter.xml +++ b/include/simpleplugin/simple-filter.xml @@ -21,7 +21,6 @@ <type>textfield</type> <tag>NAME</tag> <size>20</size> - <maxlength>60</maxlength> <default></default> <unset></unset> <set>FILTER</set> -- GitLab