From 29899c439696f136d20d6d66fb63343f430d8650 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 20 Nov 2008 05:20:52 +0000 Subject: [PATCH] BUGFIX Fixed HasManyComplexTableField, and subclass fields HasOneComplexTableField and ManyManyComplexTableField saving bug because javascript wasn't being included properly git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@66306 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/HasManyComplexTableField.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/forms/HasManyComplexTableField.php b/forms/HasManyComplexTableField.php index 0c8bc3cd6..997d84ca1 100644 --- a/forms/HasManyComplexTableField.php +++ b/forms/HasManyComplexTableField.php @@ -21,9 +21,13 @@ class HasManyComplexTableField extends ComplexTableField { protected $relationAutoSetting = false; function __construct($controller, $name, $sourceClass, $fieldList, $detailFormFields = null, $sourceFilter = "", $sourceSort = "", $sourceJoin = "") { - parent::__construct($controller, $name, $sourceClass, $fieldList, $detailFormFields, $sourceFilter, $sourceSort, $sourceJoin); + Requirements::javascript(SAPPHIRE_DIR . "/javascript/i18n.js"); + Requirements::javascript(SAPPHIRE_DIR . "/javascript/HasManyFileField.js"); + Requirements::javascript(SAPPHIRE_DIR . '/javascript/RelationComplexTableField.js'); + Requirements::css(SAPPHIRE_DIR . '/css/HasManyFileField.css'); + $this->Markable = true; if($controllerClass = $this->controllerClass()) { @@ -34,14 +38,6 @@ class HasManyComplexTableField extends ComplexTableField { } - function Field() { - Requirements::javascript(SAPPHIRE_DIR . "/javascript/i18n.js"); - Requirements::javascript(SAPPHIRE_DIR . "/javascript/HasManyFileField.js"); - Requirements::javascript(SAPPHIRE_DIR . '/javascript/RelationComplexTableField.js'); - Requirements::css(SAPPHIRE_DIR . '/css/HasManyFileField.css'); - return parent::Field(); - } - /** * Try to determine the DataObject that this field is built on top of */