BUGFIX Adjusted ForeignKey->scaffoldFormField() to new scaffolding notation ("ajaxSafe" instead of "ajax")

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64239 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-10-14 21:47:22 +00:00
parent d5a37d40dd
commit 2d33fd160a

View File

@ -27,13 +27,13 @@ class ForeignKey extends Int {
$hasOneClass = $this->object->has_one($relationName);
if($hasOneClass && singleton($hasOneClass) instanceof Image) {
if(isset($params['ajax']) && $params['ajax']) {
if(isset($params['ajaxSafe']) && $params['ajaxSafe']) {
$field = new ImageField($relationName, $title, $this->value);
} else {
$field = new SimpleImageField($relationName, $title, $this->value);
}
} elseif($hasOneClass && singleton($hasOneClass) instanceof File) {
if(isset($params['ajax']) && $params['ajax']) {
if(isset($params['ajaxSafe']) && $params['ajaxSafe']) {
$field = new FileIframeField($relationName, $title, $this->value);
} else {
$field = new FileField($relationName, $title, $this->value);