{# itop-portal-base/portal/templates/bricks/object/mode_loader.html.twig #}
{# Modal loader layout #}
{% extends 'itop-portal-base/portal/templates/modal/layout.html.twig' %}

{% block pModalContent %}
	{% include 'itop-portal-base/portal/templates/helpers/loader.html.twig' %}
	
	{% if redirection is defined and redirection.url is defined %}
		<script type="text/javascript">
			$(document).ready( function(){
				if ('{{ redirection.url|raw }}' =='')
				{
					window.location.href = window.location.href;
				}
				else
				{
					window.location = '{{ redirection.url|raw }}';
				}
			});
		</script>
	{% endif %}
{% endblock %}