-
Jaime Pérez Crespo authored
This is no longer required in HTML 5.
Unverifiedf1298f14
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
{% set pagetitle = 'Logging out...'|trans %}
{% extends "base.twig" %}
{% block preload %}
<link rel="preload" href="{{ asset('js/logout.js') }}" as="script">
{% endblock preload %}
{% block content %}
<h1>{{ pagetitle }}</h1>
{%- if terminated_service %}
{%- set SP = terminated_service['name']|translateFromArray|default('the service'|trans)|e %}
<p>{% trans %}You are now successfully logged out from {{ SP }}.{% endtrans %}</p>
{%- endif %}
{%- if remaining_services %}
{%- set failed = false %}
{%- set remaining = 0 %}
<p>{% trans %}You are also logged in on these services:{% endtrans %}</p>
<div class="custom-restricted-width">
<ul class="fa-ul">
{%- for key, sp in remaining_services %}
{%- set timeout = 5 %}
{%- set name = sp['metadata']['name']|translateFromArray|default(sp['entityID']) %}
{%- set icon = 'circle-o-notch' %}
{%- if sp['status'] == 'completed' %}
{%- set icon = 'check-circle' %}
{%- elseif sp['status'] == 'failed' %}
{%- set icon = 'exclamation-circle' %}
{%- elseif sp['status'] == 'onhold' or sp['status'] == 'inprogress '%}
{%- set remaining = remaining + 1 %}
{%- endif %}
<li id="sp-{{ key }}" data-id="{{ key }}" data-status="{{ sp['status'] }}"
{#- #} data-timeout="{{ timeout }}">
<span class="fa-li"><i id="icon-{{ key }}" class="fa fa-{{ icon }}"></i></span>
{{ name }}
{%- if sp['status'] != 'completed' and sp['status'] != 'failed' %}
{%- if type == 'nojs' %}
<iframe id="iframe-{{ key }}" class="hidden" src="{{ sp['logoutURL'] }}"></iframe>
{%- else %}
<iframe id="iframe-{{ key }}" class="hidden" data-url="{{ sp['logoutURL'] }}"></iframe>
{%- endif %}
{%- else %}
{%- if sp['status'] == 'failed' %}
({% trans %}logout is not supported{% endtrans %})
{%- endif %}
{%- endif %}
</li>
{%- endfor %}
</ul>
</div>
<br/>
<div id="error-message"{% if not failed %} class="hidden"{% endif %}>
<div class="message-box error">
{% trans %}Unable to log out of one or more services. To ensure that all your
{#- #} sessions are closed, you are encouraged to <i>close your webbrowser</i>.{% endtrans %}
</div>
</div>
<form id="error-form" action="logout-iframe-done.php"{% if remaining %} class="hidden"{% endif %}>
<input type="hidden" name="id" value="{{ auth_state }}">
<button type="submit" id="btn-continue" name="ok" class="pure-button pure-button-red">
{%- trans %}Continue{% endtrans -%}