{% extends "_base.html" %} {% load i18n %} {% load widget_tweaks %} {% load push_notification_filters %} {% block content %}
{% csrf_token %}

{% if push_notification_form.instance.id %} {% with push_notification_form.instance as push_notification_title %} {% blocktrans %}Edit news message "{{ push_notification_title }}"{% endblocktrans %} {% endwith %} {% else %} {% translate "Create news message" %} {% endif %}

{% if perms.cms.change_pushnotification %} {% endif %} {% if perms.cms.send_push_notification and not push_notification_form.instance.sent_date %} {% endif %}
    {% for other_language in languages %}
  • {{ other_language.translated_name }} {% if other_language.secondary_country_code %} {% endif %}
  • {% endfor %}
{{ pnt_formset.management_form }} {% for push_notification_translation_form in pnt_formset %}
{% if push_notification_form.instance.sent_date and push_notification_translation_form.instance.id %} {% endif %}
{% render_field push_notification_translation_form.title|add_error_class:"border-red-500" %} {% render_field push_notification_translation_form.text|add_error_class:"border-red-500" %} {% spaceless %}

/{{ push_notification_translation_form.fields.text.max_length }}

{% endspaceless %}
{% endfor %}

{% translate "Settings" %}

{% render_field push_notification_form.channel|add_error_class:"border-red-500" %} {% render_field push_notification_form.mode|add_error_class:"border-red-500" %}
{% if push_notification_form.instance.id %}

{% translate "Status" %}

{% if push_notification_form.instance.sent_date %} {{ push_notification_form.instance.sent_date }} {% else %} {% translate "Message not sent yet" %} {% endif %}
{% endif %}
{% endblock content %}