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";