{% extends "dashboard/base.html" %}
{% load i18n %}
{% load crispy_forms_tags %}

{% block title-page %}{% trans "Broadcast Messages" %}{% endblock %}

{% block content %}

<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
        <div class="pull-right">
          <a href="{% url "dashboard.views.message-list" %}"
            class="btn btn-default btn-xs">
            {% trans "Back" %}
          </a>
          <a href="{% url "dashboard.views.message-delete" pk=object.pk %}"
             class="btn btn-danger btn-xs">
            {% trans "Delete" %}
          </a>
        </div>
        <h3 class="no-margin">
          <i class="fa fa-bullhorn"></i>
          {% trans "Edit message" %}
        </h3>
      </div>
      <div class="panel-body">
        {% crispy form %}
      </div><!-- .panel-body -->
    </div>
  </div>
</div>

<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="no-margin">
          <i class="fa fa-eye"></i>
          {% trans "Preview" %}
        </h3>
      </div>
      <div class="panel-body">
        <div class="alert alert-{{ message.effect }} text-center broadcast-message">
          {{ message.message|safe }}
        </div>
      </div><!-- .panel-body -->
    </div>
  </div>
</div>

{% endblock %}

{% block broadcast_messages %}
{% endblock %}
