Skip to content

Commit 8213694

Browse files
committed
minor #9614 Add @a2lix/symfony-collection solution (webda2l)
This PR was squashed before being merged into the 3.4 branch (closes #9614). Discussion ---------- Add @a2lix/symfony-collection solution Hello, I wrote a blog post earlier this month about this package: https://a2lix.fr/2018/04/05/manage-symfony-form-collection-with-vanilla-javascript.html. IMO, as there are Symfony best practices, we should do a bit of Javascript good practices and start discouraging the use of jQuery in the documentation right now. I thought about updating the different parts of jQuery code of this form_collections.rst to a modern JS code, but it doesn't satisfy me because to do good things, it will increase number of lines of JS. And, IMO, it's better to push people to use an external JS solution (or create symfony JS based solution) instead of explain quickly how redo a poor JS solution. Any thoughts? Commits ------- d2b7cee Add @a2lix/symfony-collection solution
2 parents f6086a1 + d2b7cee commit 8213694

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

form/form_collections.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -714,13 +714,17 @@ the relationship between the removed ``Tag`` and ``Task`` object.
714714
updated (whether you're adding new tags or removing existing tags) on
715715
each Tag object itself.
716716

717-
.. sidebar:: Form collection jQuery plugin
717+
.. sidebar:: Form collection external solutions
718718

719-
The jQuery plugin `symfony-collection`_ helps with ``collection`` form elements,
720-
by providing the JavaScript functionality needed to add, edit and delete
721-
elements of the collection. More advanced functionality like moving or duplicating
722-
an element in the collection and customizing the buttons is also possible.
719+
The package `@a2lix/symfony-collection`_ helps with ``collection`` form elements,
720+
by providing to modern browsers the Javascript functionality needed to add, edit and delete
721+
elements of the collection.
722+
723+
If you want to use jQuery, there is a jQuery extension, `symfony-collection`_ with
724+
more advanced functionality like moving or duplicating an element in the collection
725+
and customizing the buttons is also possible.
723726

724727
.. _`Owning Side and Inverse Side`: https://www.doctrine-project.org/projects/doctrine-orm/en/current/reference/unitofwork-associations.html
725728
.. _`JSFiddle`: http://jsfiddle.net/847Kf/4/
729+
.. _`@a2lix/symfony-collection`: https://github.com/a2lix/symfony-collection
726730
.. _`symfony-collection`: https://github.com/ninsuo/symfony-collection

0 commit comments

Comments
 (0)