ソースを参照

Merge pull request #85 from EmmanuelVella/patch-2

Automatically select newly created options
Thomas 13 年 前
コミット
7be40e4623

+ 1 - 0
Resources/views/CRUD/edit_orm_many_association_script.html.twig

@@ -250,6 +250,7 @@ This code manage the many-to-[one|many] association field popup
                             type: 'POST',
                             success: function(html) {
                                 jQuery('#field_container_{{ id }}').replaceWith(html);
+                                jQuery('#{{ id }} option[value="' + data.objectId + '"]').attr('selected', 'selected');
                             }
                         });