From 58fa416c75857d0c942347f541cd6fe3e20bfe2a Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Thu, 30 Aug 2007 12:42:35 +0000 Subject: [PATCH] Uncheck NULL by change git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@351 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- editing.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/editing.inc.php b/editing.inc.php index 18cade1a..1828244a 100644 --- a/editing.inc.php +++ b/editing.inc.php @@ -2,6 +2,7 @@ function input($name, $field, $value) { global $types; $name = htmlspecialchars(bracket_escape($name)); + $onchange = ($field["null"] ? ' onchange="this.form[\'null[' . addcslashes($name, "\r\n'\\") . ']\'].checked = false;"' : ''); if ($field["type"] == "enum") { if (!isset($_GET["default"])) { echo ''; @@ -23,14 +24,14 @@ function input($name, $field, $value) { $val = stripcslashes(str_replace("''", "'", $val)); $id = "field-$name-" . ($i+1); $checked = (is_int($value) ? ($value >> $i) & 1 : in_array($val, explode(",", $value), true)); - echo ' '; + echo ' '; } } elseif (strpos($field["type"], "text") !== false) { - echo ''; + echo ''; } elseif (preg_match('~binary|blob~', $field["type"])) { - echo (ini_get("file_uploads") ? '' : lang('File uploads are disabled.') . ' '); + echo (ini_get("file_uploads") ? '' : lang('File uploads are disabled.') . ' '); } else { - echo ''; + echo ''; } if ($field["null"] && $field["type"] != "enum") { $id = "null-$name";