Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaa075e9

Browse files
committed
minor#14761 Shortening the text some more (ThomasLandauer)
This PR was merged into the 4.4 branch.Discussion----------Shortening the text some moreAs a separate PR, as recommended by#13450 (comment)* Reason for deleting "Add a script tag somewhere on your page...": Lenghthy text that didn't say much ;-)* Reason for deleting the `note`: The JavaScript code is shown in itself; not inside some HTML ;-)Commits-------dc794b9 Shortening the text some more
2 parentsec51ca9 +dc794b9 commitaa075e9

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

‎form/form_collections.rst

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ the following ``data-prototype`` attribute to the existing ``<ul>`` in your temp
245245

246246
<ul class="tags" data-prototype="{{ form_widget(form.tags.vars.prototype)|e('html_attr') }}"></ul>
247247

248-
Now add a button just next to the ``<ul>`` to dynamically add a new tag
248+
Now add a button just next to the ``<ul>`` to dynamically add a new tag:
249249

250250
..code-block::html+twig
251251

@@ -285,9 +285,7 @@ and dynamically add new tag forms when the user clicks the "Add a tag" link.
285285
This example uses `jQuery`_ and assumes you have it included somewhere on your
286286
page (e.g. using Symfony's:doc:`Webpack Encore</frontend>`).
287287

288-
Add a ``script`` tag somewhere on your page so you can start writing some
289-
JavaScript. In this script, bind to the "click" event of the "Add a tag"
290-
button so you can add a new tag form (``addFormToCollection()`` will be show next):
288+
Now add the required functionality with #"diff-a1398eca27c6d36f7c434149d7f582cf8633c231123636c6ac43eb1642989dd9-291-289-0" data-selected="false" role="gridcell" tabindex="-1" valign="top">291
289

292290
..code-block::javascript
293291
@@ -345,11 +343,6 @@ one example:
345343
$collectionHolder.append($newFormLi)
346344
}
347345
348-
..note::
349-
350-
It is better to separate your JavaScript in real JavaScript files than
351-
to write it inside the HTML as is done here.
352-
353346
Now, each time a user clicks the ``Add a tag`` link, a new sub form will
354347
appear on the page. When the form is submitted, any new tag forms will be converted
355348
into new ``Tag`` objects and added to the ``tags`` property of the ``Task`` object.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp