even prettier forms

This commit is contained in:
Laura Klünder 2023-10-21 00:09:21 +02:00
parent a46d2ce4f1
commit 8900408f49
2 changed files with 3 additions and 3 deletions

View file

@ -3,11 +3,11 @@
{% block heading %}
{% if form.recipient %}
{% blocktrans trimmed with msg_type=form.msg_type.name recipient=form.get_recipient_display %}
{% blocktrans trimmed with msg_type=form.msg_type.pretty_name recipient=form.get_recipient_display %}
Send {{ msg_type }} message to {{ recipient }}
{% endblocktrans %}
{% else %}
{% blocktrans trimmed with msg_type=form.msg_type.name %}
{% blocktrans trimmed with msg_type=form.msg_type.pretty_name %}
Send {{ msg_type }} message
{% endblocktrans %}
{% endif %}

View file

@ -174,7 +174,7 @@ class MeshMessageSendingView(ControlPanelMixin, TemplateView):
**data,
"node_name": node_names.get(data["msg_data"].get("address"), ""),
"recipients": [(address, node_names[address]) for address in data["recipients"]],
"msg_type": data["msg_data"]["msg_type"],
"msg_type": MeshMessageType[data["msg_data"]["msg_type"]].pretty_name,
}