FreedomBox/plinth/modules/power/templates/power_shutdown.html
Sunil Mohan Adapa f6f5b7a478
power: Refactor display of package manager busy alerts
Tests:

- Trigger the message using code change and observe the messages displayed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-12-12 12:47:59 +02:00

50 lines
1.0 KiB
HTML

{% 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 shut down? You will not be able to
access this web interface after shut down.
{% 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 %}
{% include "power_busy_warning.html" %}
<form class="form" method="post">
{% csrf_token %}
{{ form|bootstrap }}
{% if pkg_manager_is_busy %}
<input type="submit" class="btn btn-danger"
value="{% trans "Shut Down Now" %}"/>
{% else %}
<input type="submit" class="btn btn-primary"
value="{% trans "Shut Down Now" %}"/>
{% endif %}
</form>
{% endblock %}