{% load i18n %}

<div class="modal fade" id="modal_perms" style="display:none">
  <form id="permission_form" accept-charset="UTF-8" method="post" class="modal-form" action="{% if layer %}{% url "resource_permissions" 'layer' layer.id %}{% elif map %}{% url "resource_permissions" 'map' map.id %}{% elif document %}{% url "resource_permissions" 'document' document.id %}{% else %}/api/batch_permissions{% endif %}">
    <div class="modal-header">
      <a class="close" data-dismiss="modal">×</a>
      <h3>{% trans "Permissions" %}</h3>
    </div>
    {% include "_permissions.html" %}
    <div class="modal-footer">
      <a href="#" class="btn" data-dismiss="modal">{% trans "Cancel" %}</a>
      <a href="#" class="btn btn-primary" data-dismiss="modal" id="perms_submit">{% trans "Apply Changes" %}</a>
    </div>
  </form>
</div>
