]> git.joonet.de Git - adminer.git/commitdiff
Fix focusing first field
authorJakub Vrana <jakub@vrana.cz>
Tue, 11 Mar 2025 19:16:49 +0000 (20:16 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 11 Mar 2025 19:16:49 +0000 (20:16 +0100)
adminer/include/functions.inc.php

index fbc086de628c080a72ddb841de721676737be876..aa3dc034ffc4fb841bb162c77a4409bbeaaeab67 100644 (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";