Merge pull request #58 from sheadawson/patch-1

FIX bug with LiteralField for column content
This commit is contained in:
Marcus 2014-12-05 12:38:24 +11:00
commit 1a56a467fc

View File

@ -138,8 +138,12 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements
if(isset($info['callback'])) { if(isset($info['callback'])) {
$field = call_user_func($info['callback'], $record, $col, $grid); $field = call_user_func($info['callback'], $record, $col, $grid);
} elseif(isset($info['field'])) { } elseif(isset($info['field'])) {
if ($info['field'] == 'LiteralField') {
$field = new $info['field']($col, null);
}else{
$field = new $info['field']($col); $field = new $info['field']($col);
} }
}
if(!$field instanceof FormField) { if(!$field instanceof FormField) {
throw new Exception(sprintf( throw new Exception(sprintf(