1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-17 20:01:25 +02:00

Enum editing

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1240 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-11-12 15:25:21 +00:00
parent e70157827f
commit ec0282b7d7
3 changed files with 11 additions and 6 deletions

View File

@@ -404,7 +404,12 @@ class Adminer {
* @return string custom input field or empty string for default
*/
function editInput($table, $field, $attrs, $value) {
return '';
if ($field["type"] == "enum") {
return ($field["null"] ? "<label><input type='radio'$attrs value=''" . (isset($value) || isset($_GET["select"]) ? "" : " checked") . "><em>NULL</em></label> " : "")
. "<input type='radio'$attrs value='0'" . ($value === 0 ? " checked" : "") . ">"
;
}
return "";
}
/** Process sent input