diff --git a/forms/TreeDropdownField.php b/forms/TreeDropdownField.php index bcf65b0f3..7380c410a 100755 --- a/forms/TreeDropdownField.php +++ b/forms/TreeDropdownField.php @@ -74,6 +74,8 @@ class TreeDropdownField extends FormField { Requirements::javascript(SAPPHIRE_DIR . "/javascript/tree/tree.js"); Requirements::css(SAPPHIRE_DIR . "/javascript/tree/tree.css"); Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang'); + // needed for errorMessage() + Requirements::javascript(SAPPHIRE_DIR . '/javascript/LeftAndMain.js'); Requirements::javascript(SAPPHIRE_DIR . "/javascript/TreeSelectorField.js"); if($this->Value() && $record = $this->objectForKey($this->Value())) { diff --git a/forms/TreeMultiselectField.php b/forms/TreeMultiselectField.php index 8d5f5a792..a6b15aa97 100755 --- a/forms/TreeMultiselectField.php +++ b/forms/TreeMultiselectField.php @@ -29,7 +29,15 @@ class TreeMultiselectField extends TreeDropdownField { function Field() { $value = ''; $itemList = ''; + + Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype.js'); + Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour.js'); + Requirements::css(SAPPHIRE_DIR . '/css/TreeDropdownField.css'); + Requirements::javascript(SAPPHIRE_DIR . "/javascript/tree/tree.js"); + Requirements::css(SAPPHIRE_DIR . "/javascript/tree/tree.css"); Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang'); + // needed for errorMessage() + Requirements::javascript(SAPPHIRE_DIR . '/javascript/LeftAndMain.js'); Requirements::javascript(SAPPHIRE_DIR . "/javascript/TreeSelectorField.js"); $items = $this->getItems();