{% extends 'projectroles/base.html' %}

{% load rules %}
{% load crispy_forms_filters %}

{% block title %}
  {% if object.pk %}Update{% else %}Create{% endif %} Admin Alert
{% endblock %}

{% block head_extend %}
  {{ form.media }}
{% endblock head_extend %}

{% block projectroles %}

<div class="row sodar-subtitle-container">
  <h2>{% if object.pk %}Update{% else %}Create{% endif %} Admin Alert</h2>
</div>

<div class="container-fluid sodar-page-container">
  <form method="post">
    {% csrf_token %}
    {{ form | crispy }}
    <div class="row">
      <div class="btn-group ml-auto" role="group">
        <a role="button" class="btn btn-secondary"
           href="{{ request.session.real_referer }}">
          <i class="iconify" data-icon="mdi:arrow-left-circle"></i> Cancel
        </a>
        <button type="submit" class="btn btn-primary">
          <i class="iconify" data-icon="mdi:check-bold"></i>
          {% if object.pk %}Update{% else %}Create{% endif %}
        </button>
      </div>
    </div>
  </form>
</div>

{% endblock projectroles %}
