]> git.joonet.de Git - adminer.git/commitdiff
Move import out of footer
authorJakub Vrana <jakub@vrana.cz>
Tue, 13 Feb 2018 21:24:59 +0000 (22:24 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 13 Feb 2018 21:24:59 +0000 (22:24 +0100)
adminer/select.inc.php

index eeb994f015617d06a602ed592a2f49ceb787e504..30a4dc98498e91ce0e65f339cc622377434e4249 100644 (file)
@@ -558,18 +558,22 @@ if (!$columns && support("table")) {
 
                        }
 
+                       $adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns);
+                       echo "<input type='hidden' name='token' value='$token'>\n";
+                       echo "</div></div>\n";
+
                        if ($adminer->selectImportPrint()) {
-                               print_fieldset("import", lang('Import'), !$rows);
+                               echo "<div>";
+                               echo "<a href='#import'>" . lang('Import') . "</a>";
+                               echo script("qsl('a').onclick = partial(toggle, 'import');", "");
+                               echo "<span id='import'" . ($rows ? " class='hidden'" : "") . ">: ";
                                echo "<input type='file' name='csv_file'> ";
                                echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_import["format"], 1); // 1 - select
                                echo " <input type='submit' name='import' value='" . lang('Import') . "'>";
-                               echo "</div></fieldset>\n";
+                               echo "</span>";
+                               echo "</div>";
                        }
 
-                       $adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns);
-                       echo "<input type='hidden' name='token' value='$token'>\n";
-                       echo "</div></div>\n";
-
                        echo "</form>\n";
                        echo (!$group && $select ? "" : script("tableCheck();"));
                }