{% extends basetemplate %}

{% load i18n %}

{% block subtitle %}{% trans "Maintenance mode" %}{% endblock %}
{% block pagename %}{% trans "Maintenance mode" %}{% endblock %}
{% block description %}{% trans "Maintainance mode allows you to close your site for maintainance, allowing only a predetermined set of ip addresses to access it normally." %}{% endblock %}

{% block admincontent %}
<form method="POST" action="">
    {% csrf_token %}
    {% if in_maintenance %}
        <h1>{% trans "Your site is currently running on maintenance mode." %}</h1>
        <p>{% trans "You can adjust the settings bellow" %}</p>
    {% endif %}
    <table>
    {{ form.as_table }}
    </table>
    {% if in_maintenance %}
        <input type="submit" name="adjust" value="{% trans "Adjust settings" %}" />
        <input type="submit" name="open" value="{% trans "Open site" %}" />
    {% else %}
        <input type="submit" name="close" value="{% trans "Close for maintenance" %}" />
    {% endif %}
</form>
{% endblock %}