diff --git a/Resources/views/CRUD/edit_orm_one_to_many.html.twig b/Resources/views/CRUD/edit_orm_one_to_many.html.twig index 6e692561e..bb424244c 100644 --- a/Resources/views/CRUD/edit_orm_one_to_many.html.twig +++ b/Resources/views/CRUD/edit_orm_one_to_many.html.twig @@ -107,14 +107,14 @@ file that was distributed with this source code. function apply_position_value_{{ id }}() { // update the input value position - jQuery('div#field_container_{{ id }} tbody.sonata-ba-tbody td.sonata-ba-td-{{ id }}-position').each(function(index, element) { + jQuery('div#field_container_{{ id }} tbody.sonata-ba-tbody td.sonata-ba-td-{{ id }}-{{ sonata_admin.field_description.options.sortable }}').each(function(index, element) { // remove the sortable handler and put it back jQuery('span.sonata-ba-sortable-handler', element).remove(); jQuery(element).append(''); jQuery('input', element).hide(); }); - jQuery('div#field_container_{{ id }} tbody.sonata-ba-tbody td.sonata-ba-td-{{ id }}-position input').each(function(index, value) { + jQuery('div#field_container_{{ id }} tbody.sonata-ba-tbody td.sonata-ba-td-{{ id }}-{{ sonata_admin.field_description.options.sortable }} input').each(function(index, value) { jQuery(value).val(index + 1); }); }