Skip to content

Commit

Permalink
Merge pull request #57 from pinax/doc-fix
Browse files Browse the repository at this point in the history
Use form instead of a tag in docs
  • Loading branch information
jtauber authored Jul 22, 2016
2 parents 59a886f + 566b0c8 commit 3d4e96d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ See [Template tags](./templatetags.md) for detail on pinax-announcements templat
Add this markup to show a "Dismiss" link if available:

{% if announcement.dismiss_url %}
<a href="{{ announcement.dismiss_url }}" class="btn ajax" data-method="post" data-replace-closest=".announcement">
Clear
</a>
<form class="form ajax" data-replace-closest=".announcement" action="{{ announcement.dismiss_url }}" method="post">
{% csrf_token %}
<button class="btn btn-default">Clear</button>
</form>
{% endif %}

### Dismissal with Eldarion AJAX
Expand All @@ -74,5 +75,3 @@ This of course is optional. You can roll your own JavaScript handling as
the view also returns data in addition to rendered HTML. Furthermore, if
you don't want `ajax` at all the view will handle a regular `POST` and
perform a redirect.


0 comments on commit 3d4e96d

Please sign in to comment.