]> git.joonet.de Git - adminer.git/commitdiff
Respect unchecked Default values
authorJakub Vrana <jakub@vrana.cz>
Fri, 9 Feb 2018 16:45:50 +0000 (17:45 +0100)
committerJakub Vrana <jakub@vrana.cz>
Fri, 9 Feb 2018 16:45:50 +0000 (17:45 +0100)
adminer/create.inc.php

index 03e023cafbe5170c585c8439b93be95fcb249553..3c887051127cce925d89eb9604ad1122b249e227 100644 (file)
@@ -186,8 +186,8 @@ edit_fields($row["fields"], $collations, "TABLE", $foreign_keys, $comments);
 </table>
 <p>
 <?php echo lang('Auto Increment'); ?>: <input type="number" name="Auto_increment" size="6" value="<?php echo h($row["Auto_increment"]); ?>">
-<?php echo checkbox("defaults", 1, true, lang('Default values'), "columnShow(this.checked, 5)", "jsonly"); ?>
-<?php if (!$_POST["defaults"]) { echo script("editingHideDefaults();"); } ?>
+<?php echo checkbox("defaults", 1, !$_POST || $_POST["defaults"], lang('Default values'), "columnShow(this.checked, 5)", "jsonly"); ?>
+<?php if (!$_POST) { echo script("editingHideDefaults();"); } ?>
 <?php echo (support("comment")
        ? "<label><input type='checkbox' name='comments' value='1' class='jsonly'" . ($comments ? " checked" : "") . ">" . lang('Comment') . "</label>"
                . script("qsl('input').onclick = partial(editingCommentsClick, true);")