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

{% load crispy_forms_filters %}

{% block title %}
  Delete Email Address
{% endblock title %}

{% block projectroles %}

<div class="row sodar-pr-content-title pt-2">
  <h2 class="sodar-pr-content-title">{{ request.user.get_full_name }}</h2>
  <div class="sodar-pr-content-title-secondary text-muted">User Profile</div>
</div>

<div class="row sodar-subtitle-container">
  <h3>Delete Email Address {{ object.email }}</h3>
</div>

<div class="container-fluid sodar-page-container">
  <div class="alert alert-warning">
    Are you sure you want to delete the additional email address
    <a href="mailto:{{ object.email }}">{{ object.email }}</a>? Deleting the
    address means it will no longer receive automated emails from this site. This
    can only be undone by adding and re-verifying the address.
  </div>
  <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="{% url 'userprofile:detail' %}">
          <i class="iconify" data-icon="mdi:arrow-left-circle"></i> Cancel
        </a>
        <button type="submit" class="btn btn-danger">
          <i class="iconify" data-icon="mdi:close-thick"></i> Delete
        </button>
      </div>
    </div>
  </form>
</div>

{% endblock projectroles %}
