{% extends "spider_base/protections/base.html" %}
{% load spider_protections i18n spider_rdf %}

{% block extrahead %}
{# don't render super (contains "media" variable) #}
{% extract_protections "protections" as protections %}
{{protections.media|safe}}
{% endblock %}

{% block main_classes %}{{block.super}} color-front-{{uc.untrusted_strength}}{% endblock %}
{% block body_class %}{{block.super}} color-back-{{uc.untrusted_strength}}{% endblock %}

{% block content %}
{% extract_protections "protections" as protections %}
<form class="w3-padding" action="{{ request.get_full_path }}" name="SPKCProtectionForm" method="post">
  <input type="hidden" property="spkc:csrftoken" name="csrfmiddlewaretoken" datatype="xsd:string" content="{{csrf_token}}" value="{{csrf_token}}">
  <data hidden="hidden" property="spkc:protections.amount" datatype="xsd:nonNegativeInteger">{{protections|length}}</data>
  <data hidden="hidden" property="spkc:strength" datatype="xsd:integer">{{uc.untrusted_strength}}</data>

    {# fieldsets don't allow horizontal scrolling #}
    <h1>{% trans 'Authenticate' %}</h1>
    <div class="w3-padding w3-border" style="overflow-y: auto; max-height:600px">
    {% for prot in protections %}
      {% include "spider_base/protections/protection_item.html" with prot=prot %}
    {% empty %}
      <data hidden="hidden" resource="rdf:nil"/>
    {% endfor %}
  </div>
  <button class="w3-button w3-grey">
    {% trans 'Send' %}
  </button>
</form>
{% endblock %}
