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

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

{% block page_head %}
{% endblock %}

{% block content %}

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

  <p>
    {% blocktrans trimmed %}
      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 d-flex align-items-center" role="alert">
      <div class="me-2">
        {% icon 'exclamation-triangle' %}
        <span class="visually-hidden">{% trans "Caution:" %}</span>
      </div>
      <div>
        {% blocktrans trimmed %}
          You have {{ max_filesize }} available to restore a backup.
          Exceeding this limit can leave your {{ box_name }} unusable.
        {% endblocktrans %}
      </div>
    </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 %}
