Author: Jonathan.Wage
Date: 2010-01-27 03:29:48 +0100 (Wed, 27 Jan 2010)
New Revision: 27221

Modified:
   
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContentSlot.class.php
Log:
[1.4][sfSympalPlugin][1.0] Fixing issue with content type forms and other fields


Modified: 
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContentSlot.class.php
===================================================================
--- 
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContentSlot.class.php
 2010-01-27 02:29:24 UTC (rev 27220)
+++ 
plugins/sfSympalPlugin/trunk/lib/model/doctrine/PluginsfSympalContentSlot.class.php
 2010-01-27 02:29:48 UTC (rev 27221)
@@ -81,8 +81,12 @@
       $contentTypeTranslationTable = 
Doctrine_Core::getTable($contentTypeTranslationClassName);
       if ($contentTypeTranslationTable->hasField($this->name))
       {
-        $form = new $contentTypeFormClassName($content->getRecord());
-        
$form->useFields(array(sfContext::getInstance()->getUser()->getCulture()));
+        $form = new $contentTypeFormClassName($content->getRecord()); 
+        $i18nForm = $form->getEmbeddedForm($language = 
sfContext::getInstance()->getUser()->getCulture()); 
+        $i18nForm->useFields(array($this->name)); 
+        unset($form[$language]); 
+        $form->embedForm($language, $i18nForm); 
+        $form->useFields(array($language)); 
       }
     }
 

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to