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 */