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

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

{% block content %}

  {% block pagetitle %}
    <h2>{{ title }}</h2>
  {% endblock %}

  <p>
    {% blocktrans trimmed %}
      Are you sure you want to restart? You will not be able to access
      this web interface for a few minutes until the system is
      restarted.
    {% endblocktrans %}
  </p>

  {% if manual_page %}
    <p class="manual-page">
      <a href="{% url 'help:manual-page' lang='-' page=manual_page %}">
        {% trans 'Learn more...' %}
      </a>
    </p>
  {% endif %}

  {% if pkg_manager_is_busy %}
    <div class="alert alert-danger">
    {% blocktrans trimmed %}
      Currently an installation or upgrade is running.
      Consider waiting until it's finished before restarting.
    {% endblocktrans %}
    </div>
  {% endif %}

  <form class="form" method="post">
    {% csrf_token %}

    {{ form|bootstrap }}

    {% if pkg_manager_is_busy %}
      <input type="submit" class="btn btn-danger"
             value="{% trans "Restart Now" %}"/>
    {% else %}
      <input type="submit" class="btn btn-primary"
             value="{% trans "Restart Now" %}"/>
    {% endif %}

  </form>

{% endblock %}
