测试插件中使用默认自定义字段

This commit is contained in:
joyqi
2013-11-25 10:39:02 +08:00
parent e6bf9e460d
commit fa55695621
8 changed files with 57 additions and 16 deletions
+6
View File
@@ -502,6 +502,12 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg
$item->input->setAttribute('name', 'fields[' . $name . ']');
}
$isFieldReadOnly = $this->pluginHandle('Widget_Abstract_Contents')
->trigger($plugged)->isFieldReadOnly($name);
if ($plugged && $isFieldReadOnly) {
$item->input->setAttribute('readonly', 'readonly');
}
$item->value($fields->{$name});
$defaultFields[$name] = array($item->label, $item->input);
}