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

{% block title-page %}
{% if form.instance.pk %}{{ form.instance.name }}{% else %}{% trans "Create" %}{% endif %}
| {% trans "lease type" %}
{% endblock %}

{% block content %}

<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
        <div class="pull-right">
          {% if object.pk %}
            <a class="btn btn-xs btn-danger"
              href="{% url "request.views.lease-type-delete" pk=object.pk %}">
              <i class="fa fa-times"></i> {% trans "Delete" %}
          </a>
          {% endif %}
          <a class="btn btn-xs btn-default" href="{% url "request.views.type-list" %}">
            {% trans "Back" %}
          </a>
        </div>
        <h3 class="no-margin">
          <i class="fa fa-clock-o"></i>
          {% if form.instance.pk %}
            {{ form.instance.name }}
          {% else %}
            {% trans "New lease type" %}
          {% endif %}
        </h3>
      </div>
      <div class="panel-body">
        <div class="row">
          <div class="col-md-8">
            {% crispy form %}
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

{% endblock %}
