1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Fix focusing first field

This commit is contained in:
Jakub Vrana
2025-03-11 20:16:49 +01:00
parent a94a727af7
commit 43d86287c4

View File

@@ -1423,6 +1423,7 @@ function edit_form($table, $fields, $row, $update) {
<form action="" method="post" enctype="multipart/form-data" id="form">
<?php
$first = 0;
$is_first = true;
if (!$fields) {
echo "<p class='error'>" . lang('You have no privileges to update this table.') . "\n";
} else {
@@ -1467,8 +1468,10 @@ function edit_form($table, $fields, $row, $update) {
$value = "";
$function = "uuid";
}
if ($field["auto_increment"] || $function == "now" || $function == "uuid") {
if ($is_first && ($field["auto_increment"] || $function == "now" || $function == "uuid")) {
$first++;
} else {
$is_first = false;
}
input($field, $value, $function);
echo "\n";