소스 검색

Merge pull request #41 from beeldspraak/fix-jquery-datatype-one-association-script

add dataType to jquery ajax submit to append a form field
Thomas 13 년 전
부모
커밋
3ce7bdead2
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Resources/views/CRUD/edit_orm_one_association_script.html.twig

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

@@ -39,6 +39,7 @@ This code manage the one-to-many association field popup
                 'uniqid':    sonata_admin.admin.root.uniqid
                 'uniqid':    sonata_admin.admin.root.uniqid
             }) }}',
             }) }}',
             type: "POST",
             type: "POST",
+            dataType: 'html',
             data: { _xml_http_request: true },
             data: { _xml_http_request: true },
             success: function(html) {
             success: function(html) {
                 jQuery('#field_container_{{ id }}').replaceWith(html); // replace the html
                 jQuery('#field_container_{{ id }}').replaceWith(html); // replace the html