소스 검색

Merge pull request #85 from EmmanuelVella/patch-2

Automatically select newly created options
Thomas 13 년 전
부모
커밋
7be40e4623
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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');
                             }
                         });