mirror of
https://github.com/vrana/adminer.git
synced 2026-07-01 00:38:33 +02:00
Make maxlength in all fields a soft limit
This commit is contained in:
@@ -44,7 +44,7 @@ class AdminerEditCalendar {
|
||||
if (preg_match("~date|time~", $field["type"])) {
|
||||
$dateFormat = "changeYear: true, dateFormat: 'yy-mm-dd'"; //! yy-mm-dd regional
|
||||
$timeFormat = "showSecond: true, timeFormat: 'HH:mm:ss', timeInput: true";
|
||||
return "<input id='fields-" . h($field["field"]) . "' value='" . h($value) . "'" . (@+$field["length"] ? " maxlength='" . (+$field["length"]) . "'" : "") . "$attrs>" . script(
|
||||
return "<input id='fields-" . h($field["field"]) . "' value='" . h($value) . "'" . (@+$field["length"] ? " data-maxlength='" . (+$field["length"]) . "'" : "") . "$attrs>" . script(
|
||||
"jQuery('#fields-" . js_escape($field["field"]) . "')."
|
||||
. ($field["type"] == "time" ? "timepicker({ $timeFormat })"
|
||||
: (preg_match("~time~", $field["type"]) ? "datetimepicker({ $dateFormat, $timeFormat })"
|
||||
|
||||
@@ -34,7 +34,7 @@ class AdminerSlugify {
|
||||
}
|
||||
$slug = $slugify[$field["field"]];
|
||||
if ($slug !== null) {
|
||||
return "<input value='" . h($value) . "' maxlength='$field[length]' size='40'$attrs>"
|
||||
return "<input value='" . h($value) . "' data-maxlength='$field[length]' size='40'$attrs>"
|
||||
. script("qsl('input').onchange = function () {
|
||||
var find = '$this->from';
|
||||
var repl = '$this->to';
|
||||
|
||||
Reference in New Issue
Block a user