{% extends 'modal_base.html' %}
{% load i18n %}

{% block title %}
	{% trans 'Confirmation' %}
{% endblock %}

{% block body %}
	<div class="modal-body">
		{% for message in messages %}
			<div {% if message.tags %} class="alert alert-{{ message.tags }} alert-dismissible" {% else %} class="alert alert-info" {% endif %}>
				{{ message|safe }}
			</div>
		{% endfor %}
	</div>
	<div class="modal-footer clearfix">
		<a class="btn btn-primary pull-right" href="{{ success_url }}">
			{% trans 'OK' %}
		</a>
	</div>
	<script type="text/javascript">
		window.setTimeout(function(){
			$('#dialog-box-modal').modal('hide');
			$('#dialog-box-modal').on('hidden.bs.modal', function (e) {
				window.location = '{{ success_url }}'
			});
		}, 2000)
	</script>
{% endblock %}
