]> git.andy128k.dev Git - ipf.git/commitdiff
fix
authoravl <alex.litovchenko@gmail.com>
Wed, 27 Jan 2010 13:09:52 +0000 (15:09 +0200)
committeravl <alex.litovchenko@gmail.com>
Wed, 27 Jan 2010 13:09:52 +0000 (15:09 +0200)
ipf/form/field/treemodelchoice.php

index caedaeb5bce9a35ce865f04f90f5668a58551b36..ccec81c13755d135dd047e174428f0bf9ce427d4 100644 (file)
@@ -5,14 +5,15 @@ class IPF_Form_Field_TreeModelChoice extends IPF_Form_Field_Choice{
     public $widget = 'IPF_Form_Widget_TreeSelectInput';
     protected $_models;
 
-    function __construct($params=array()){
+       function __construct($params=array()){
         parent::__construct($params);
         $this->_models = $params['models'];
         $choices = array('--------'=>'');
+        $levels = $this->_getLevels();
         $this->_collectTreeRecursive(&$choices);
         $this->setChoices($choices);
-        $this->widget->setLevels($this->_getLevels());
-    }
+        $this->widget->setLevels($levels);
+    }    
     
     protected function _getLevels(){
         $levels = array();