{% extends "base.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}

{% load bootstrap %}
{% load i18n %}

{% block page_head %}
{% endblock %}

{% block content %}

  <h3>{{ title }}</h3>

  <p>
    {% blocktrans %}
      Upload a backup file downloaded from another {{ box_name }} to restore its
      contents. You can choose the apps you wish to restore after uploading a
      backup file.
    {% endblocktrans %}
  </p>

  {% if max_filesize %}
    <div class="alert alert-warning" role="alert">
      <span class="fa fa-exclamation-triangle" aria-hidden="true"></span>
      <span class="sr-only">{% trans "Caution:" %}</span>
      {% blocktrans trimmed %}
        You have {{ max_filesize }} available to restore a backup.
        Exceeding this limit can leave your {{ box_name }} unusable.
      {% endblocktrans %}
    </div>
  {% endif %}

  <form class="form form-upload" enctype="multipart/form-data" method="post">
    {% csrf_token %}

    {{ form|bootstrap }}

    <input type="submit" class="btn btn-primary"
           value="{% trans "Upload file" %}"/>
  </form>

{% endblock %}
