Author: uncleringo
Date: 2010-03-02 14:15:35 +0100 (Tue, 02 Mar 2010)
New Revision: 28341
Modified:
plugins/sfTrafficCMSPlugin/trunk/lib/form/TrafficCMSBaseForm.class.php
Log:
Unbroken the updating of embedded models
BUT this means you get an error when trying to delete an embedded model
Modified: plugins/sfTrafficCMSPlugin/trunk/lib/form/TrafficCMSBaseForm.class.php
===================================================================
--- plugins/sfTrafficCMSPlugin/trunk/lib/form/TrafficCMSBaseForm.class.php
2010-03-02 13:07:48 UTC (rev 28340)
+++ plugins/sfTrafficCMSPlugin/trunk/lib/form/TrafficCMSBaseForm.class.php
2010-03-02 13:15:35 UTC (rev 28341)
@@ -325,8 +325,7 @@
if
(isset($_POST[$object->getTable()->getTableName()][$embedded_form_name][$widget_name]['_delete_embedded']))
{
- $object_to_embed->delete();
- unset($children[$key]);
+ $children->remove($key);
continue;
}
@@ -350,7 +349,8 @@
);
}
- $object->set($model_class . 's', $children);
+ $children->save();
+// $object->set($model_class . 's', $children);
// if ($object_count > 0)
// {
$this->embedForm($embedded_form_name, $form_to_embed);
--
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.