Преглед изворни кода

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