2019-12-16 08:53:29 +00:00
|
|
|
|
{% extends '_base_only_content.html' %}
|
2016-09-01 15:09:58 +00:00
|
|
|
|
{% load static %}
|
2019-12-16 08:53:29 +00:00
|
|
|
|
{% load i18n %}
|
|
|
|
|
{% block html_title %} {{ title }} {% endblock %}
|
|
|
|
|
{% block title %} {{ title }}{% endblock %}
|
2016-09-01 15:09:58 +00:00
|
|
|
|
|
2019-12-16 08:53:29 +00:00
|
|
|
|
{% block content %}
|
|
|
|
|
<div>
|
|
|
|
|
{% if errors %}
|
|
|
|
|
<p>
|
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
|
{{ errors }}
|
|
|
|
|
</div>
|
|
|
|
|
</p>
|
|
|
|
|
{% endif %}
|
2016-09-01 15:09:58 +00:00
|
|
|
|
|
2019-12-16 08:53:29 +00:00
|
|
|
|
{% if messages %}
|
|
|
|
|
<p>
|
|
|
|
|
<div class="alert alert-success" id="messages">
|
|
|
|
|
{{ messages|safe }}
|
2016-09-01 15:09:58 +00:00
|
|
|
|
</div>
|
2019-12-16 08:53:29 +00:00
|
|
|
|
</p>
|
|
|
|
|
{% endif %}
|
2016-09-01 15:09:58 +00:00
|
|
|
|
<div class="row">
|
2021-04-29 09:15:46 +00:00
|
|
|
|
{% if has_cancel %}
|
|
|
|
|
<div class="col-lg-2">
|
|
|
|
|
<a href="{{ cancel_url }}" class="btn btn-default block full-width m-b">
|
|
|
|
|
{% trans 'Cancel' %}
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
<div class="col-lg-2">
|
2021-04-29 04:21:39 +00:00
|
|
|
|
<a href="{{ redirect_url }}" class="btn btn-primary block full-width m-b">
|
|
|
|
|
{% if confirm_button %}
|
|
|
|
|
{{ confirm_button }}
|
|
|
|
|
{% else %}
|
2021-04-29 09:15:46 +00:00
|
|
|
|
{% trans 'Go' %}
|
2021-04-29 04:21:39 +00:00
|
|
|
|
{% endif %}
|
|
|
|
|
</a>
|
2016-09-01 15:09:58 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-12-16 08:53:29 +00:00
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block custom_foot_js %}
|
2016-09-02 16:39:06 +00:00
|
|
|
|
<script>
|
2017-03-31 03:25:25 +00:00
|
|
|
|
var time = '{{ interval }}';
|
2019-12-16 08:53:29 +00:00
|
|
|
|
if (!time) {
|
2017-03-31 03:25:25 +00:00
|
|
|
|
time = 5;
|
|
|
|
|
} else {
|
|
|
|
|
time = parseInt(time);
|
|
|
|
|
}
|
2019-12-16 08:53:29 +00:00
|
|
|
|
|
2016-09-02 16:39:06 +00:00
|
|
|
|
function redirect_page() {
|
|
|
|
|
if (time >= 0) {
|
2019-12-16 08:53:29 +00:00
|
|
|
|
var messages = '{{ messages|safe }}, <b>' + time + '</b> ...';
|
2016-09-02 16:39:06 +00:00
|
|
|
|
$('#messages').html(messages);
|
|
|
|
|
time--;
|
|
|
|
|
setTimeout(redirect_page, 1000);
|
2019-12-16 08:53:29 +00:00
|
|
|
|
} else {
|
2016-09-02 16:39:06 +00:00
|
|
|
|
window.location.href = "{{ redirect_url }}";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{% if auto_redirect %}
|
2019-12-16 08:53:29 +00:00
|
|
|
|
window.onload = redirect_page;
|
2016-09-02 16:39:06 +00:00
|
|
|
|
{% endif %}
|
|
|
|
|
</script>
|
2019-12-16 08:53:29 +00:00
|
|
|
|
{% endblock %}
|
|
|
|
|
|