mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
Make maxlength in edit fields a soft limit
This commit is contained in:
@@ -914,7 +914,7 @@ function input($field, $value, $function) {
|
||||
// type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator
|
||||
echo "<input"
|
||||
. ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) ? " type='number'" : "")
|
||||
. " value='" . h($value) . "'" . ($maxlength ? " maxlength='$maxlength'" : "")
|
||||
. " value='" . h($value) . "'" . ($maxlength ? " data-maxlength='$maxlength'" : "")
|
||||
. (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "")
|
||||
. "$attrs>"
|
||||
;
|
||||
|
Reference in New Issue
Block a user