Browse Source

Merge pull request #85 from EmmanuelVella/patch-2

Automatically select newly created options
Thomas 13 years ago
parent
commit
7be40e4623
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Resources/views/CRUD/edit_orm_many_association_script.html.twig

+ 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');
                             }
                         });