1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 15:47:00 +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"> <form action="" method="post" enctype="multipart/form-data" id="form">
<?php <?php
$first = 0; $first = 0;
$is_first = true;
if (!$fields) { if (!$fields) {
echo "<p class='error'>" . lang('You have no privileges to update this table.') . "\n"; echo "<p class='error'>" . lang('You have no privileges to update this table.') . "\n";
} else { } else {
@@ -1467,8 +1468,10 @@ function edit_form($table, $fields, $row, $update) {
$value = ""; $value = "";
$function = "uuid"; $function = "uuid";
} }
if ($field["auto_increment"] || $function == "now" || $function == "uuid") { if ($is_first && ($field["auto_increment"] || $function == "now" || $function == "uuid")) {
$first++; $first++;
} else {
$is_first = false;
} }
input($field, $value, $function); input($field, $value, $function);
echo "\n"; echo "\n";