mirror of
https://github.com/vrana/adminer.git
synced 2025-08-07 15:16:44 +02:00
Remove hardcoded textarea height
This commit is contained in:
@@ -306,7 +306,7 @@ function input($field, $value, $function, $autofocus = false) {
|
||||
$attrs .= " cols='50' rows='12'";
|
||||
} else {
|
||||
$rows = min(12, substr_count($value, "\n") + 1);
|
||||
$attrs .= " cols='30' rows='$rows'" . ($rows == 1 ? " style='height: 1.2em;'" : ""); // 1.2em - line-height
|
||||
$attrs .= " cols='30' rows='$rows'";
|
||||
}
|
||||
echo "<textarea$attrs>" . h($value) . '</textarea>';
|
||||
} else {
|
||||
|
@@ -10,7 +10,7 @@ class AdminerEditTextarea {
|
||||
|
||||
function editInput($table, $field, $attrs, $value) {
|
||||
if (preg_match('~char~', $field["type"])) {
|
||||
return "<textarea cols='30' rows='1' style='height: 1.2em;'$attrs>" . Adminer\h($value) . '</textarea>';
|
||||
return "<textarea cols='30' rows='1'$attrs>" . Adminer\h($value) . '</textarea>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user