Skip to content

Commit

Permalink
fix(forum_conversation) deduplicate collapseMentionHelp ids
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Sep 18, 2023
1 parent 6eb82f6 commit b6d6019
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
{% endfor %}
{% endif %}
{% include "partials/form_field.html" with field=post_form.content %}
{% include "partials/form_field.html" with field=post_form.content id=topic.pk %}
{% if post_form.username %}
{% include "partials/form_field.html" with field=post_form.username %}
{% endif %}
Expand Down
6 changes: 5 additions & 1 deletion lacommunaute/templates/partials/form_field.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
{% if field.help_text %}<small class="form-text text-muted">{{ field.help_text }}</small>{% endif %}
{% for error in field.errors %}<span class="text-danger error">{{ error }}</span>{% endfor %}
{% if field.auto_id == 'id_content' %}
{% include "partials/form_field_mentions.html" %}
{% if id %}
{% include "partials/form_field_mentions.html" with id=id%}
{% else %}
{% include "partials/form_field_mentions.html" %}
{% endif %}
{% endif %}
</div>
2 changes: 1 addition & 1 deletion lacommunaute/templates/partials/form_field_mentions.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sur les champs libres
</small>

<div class="collapse" id="collapseMentionsHelp">
<div class="collapse" id="collapseMentionsHelp{{ id }}">
<div class="mb-3">
<p>
Nous vous demandons de ne pas nous transmettre d’informations sensibles. Notamment, ne communiquez pas vos opinions philosophiques, syndicales, politiques ou sur votre vie sexuelle. Ces données sont trop personnelles !
Expand Down

0 comments on commit b6d6019

Please sign in to comment.