Don't use type="number" for decimal numbers
Google Chrome formats decimal point according to locale, treats it as invalid character and trims full stop
This commit is contained in:
parent
b5ad37ff2b
commit
588cb7c0c3
|
@ -743,7 +743,7 @@ function input($field, $value, $function) {
|
|||
// int(3) is only a display hint
|
||||
$maxlength = (!ereg('int', $field["type"]) && preg_match('~^(\\d+)(,(\\d+))?$~', $field["length"], $match) ? ((ereg("binary", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
|
||||
// type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator
|
||||
echo "<input" . (ereg('int|float|double|decimal', $field["type"]) ? " type='number'" : "") . " value='" . h($value) . "'" . ($maxlength ? " maxlength='$maxlength'" : "") . (ereg('char|binary', $field["type"]) && $maxlength > 20 ? " size='40'" : "") . "$attrs>";
|
||||
echo "<input" . (ereg('int', $field["type"]) ? " type='number'" : "") . " value='" . h($value) . "'" . ($maxlength ? " maxlength='$maxlength'" : "") . (ereg('char|binary', $field["type"]) && $maxlength > 20 ? " size='40'" : "") . "$attrs>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
Adminer 3.6.3-dev:
|
||||
Treat Meta key same as Ctrl
|
||||
Don't use type="number" for decimal numbers
|
||||
|
||||
Adminer 3.6.2 (released 2012-12-21):
|
||||
Edit values by Ctrl+click instead of double click
|
||||
|
|
Loading…
Reference in a new issue