{% extends 'admin/model/edit.html' %}
{% import 'bukuserver/lib.html' as buku with context %}

{% block head %}
  {{ super() }}
  {{ buku.brand_dbname() }}
{% endblock %}

{% block edit_form %}
  {{ super() }}
  <form method="POST" action="{{ get_url('.delete_view') }}" class="delete-form" style="display: inline-block;  float: right">
    <input type="hidden" name="id" value="{{ request.args.get('id') }}"/>
    <input type="hidden" name="url" value="{{ return_url }}"/>
    {% if csrf_token %}
    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
    {% endif %}
    <button class="btn btn-warning" onclick="return faHelpers.safeConfirm('{{ _gettext('Are you sure you want to delete this record?') }}');">
      {{ _gettext('Delete') }}
    </button>
  </form>
{% endblock %}

{% block tail %}
  {{ super() }}
  {{ buku.set_lang() }}
  {{ buku.limit_navigation_if_popup() }}
  {{ buku.script('bookmark.js') }}
  {{ buku.focus() }}
  {{ buku.link_saved() }}
  <script>$('.submit-row').append($('.delete-form'))</script>
{% endblock %}
