Skip to content

Commit

Permalink
Merge pull request #1799 from svojtkova/svojtkova
Browse files Browse the repository at this point in the history
Fix newline in chat deletion confirmation box
  • Loading branch information
timobrembeck authored Oct 27, 2022
2 parents 937fe5c + 7800d69 commit c87c51f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
9 changes: 6 additions & 3 deletions integreat_cms/cms/templates/chat/_chat_messages.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
<span class="font-bold">{{ message.sender.full_user_name }}</span>
{% if message.sender.email %}({{ message.sender.email|urlize }}){% endif %}
{% has_perm 'cms.delete_chat_message_object' request.user message as can_delete_message %}
<button title="{% trans "Delete chat message" %}" class="{% if not can_delete_message %} invisible{% endif %} button-delete-chat-message btn-icon float-right ml-2" data-confirmation-title="{% trans "Please confirm that you really want to delete this chat message:" %}" data-confirmation-text='{% trans "Sender:" %} {{ message.sender.full_user_name }}
<br />
{% trans "Sent on:" %} {{ message.sent_datetime }}' data-confirmation-subject="{{ message.text }}" data-action="{% spaceless %} {% if request.region %} {% url "delete_chat_message" region_slug=request.region.slug message_id=message.id %} {% else %} {% url "delete_chat_message" message_id=message.id %} {% endif %} {% endspaceless %}">
<button title="{% trans "Delete chat message" %}"
class="{% if not can_delete_message %} invisible{% endif %} button-delete-chat-message btn-icon float-right ml-2"
data-confirmation-title="{% trans "Please confirm that you really want to delete this chat message:" %}"
data-confirmation-text='{% trans "Sender:" %} {{ message.sender.full_user_name }} &#010 {% trans "Sent on:" %} {{ message.sent_datetime }}'
data-confirmation-subject="{{ message.text }}"
data-action="{% spaceless %} {% if request.region %} {% url "delete_chat_message" region_slug=request.region.slug message_id=message.id %} {% else %} {% url "delete_chat_message" message_id=message.id %} {% endif %} {% endspaceless %}">
<i icon-name="trash-2"></i>
</button>
<span class="text-gray-600 float-right">{{ message.sent_datetime }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="w-full p-4 rounded shadow">
<h2 id="confirmation-title"></h2>
<h3 id="confirmation-subject" class="text-center mt-4 mb-6 break-words"></h3>
<p id="confirmation-text" class="mt-4 mb-6"></p>
<p id="confirmation-text" class="mt-4 mb-6 whitespace-pre-line"></p>
<form method="post" action="#">
{% csrf_token %}
<div class="flex justify-end gap-2">
Expand Down
8 changes: 4 additions & 4 deletions integreat_cms/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-10-26 22:39+0000\n"
"POT-Creation-Date: 2022-10-27 09:09+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Integreat <[email protected]>\n"
"Language-Team: Integreat <[email protected]>\n"
Expand Down Expand Up @@ -3939,15 +3939,15 @@ msgstr "Ihre E-Mail-Adresse hier eingeben"
msgid "Delete chat message"
msgstr "Chat-Nachricht löschen"

#: cms/templates/chat/_chat_messages.html:12
#: cms/templates/chat/_chat_messages.html:14
msgid "Please confirm that you really want to delete this chat message:"
msgstr "Bitte bestätigen Sie, dass diese Chat-Nachricht gelöscht werden soll:"

#: cms/templates/chat/_chat_messages.html:12
#: cms/templates/chat/_chat_messages.html:15
msgid "Sender:"
msgstr "Absender:"

#: cms/templates/chat/_chat_messages.html:14
#: cms/templates/chat/_chat_messages.html:15
msgid "Sent on:"
msgstr "Gesendet am:"

Expand Down

0 comments on commit c87c51f

Please sign in to comment.