Skip to content
Snippets Groups Projects
Commit d019b4c7 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

core: Add more Twig templates

parent 604c255d
No related branches found
No related tags found
No related merge requests found
{% set pagetitle = '{logout:progress}'|trans %}
{% extends "base.twig" %}
{% block content %}
{# pretty arbitrary height, but should have enough safety margins for most cases #}
{% set iframeHeight = (25 + (SPs|length * 4)) %}
<iframe style="width:100%; height: {{ iframeHeight }}em; border:0;" src="logout-iframe.php?type=embed&id={{ auth_state|escape('url') }}"></iframe>
{% for assocId, sp in SPs %}
{% if attribute(sp, 'core:Logout-IFrame:State') == 'inprogress' %}
<iframe style="width:0; height:0; border:0;" src="{{ attribute(sp, 'core:Logout-IFrame:URL')|escape('html') }}</iframe>
{% endif %}
{% endfor %}
{% endblock %}
{% set pagetitle = '{core:no_cookie:header}'|trans %}
{% extends "base.twig" %}
{% block content %}
<h2>{{ header }}</h2>
<p>{{ description }}</p>
{% if retryURL is not null %}
<ul>
<li><a href="{{ retryURL|escape('html') }}" id="retry">{{ retry }}</a></li>
</ul>
{% endif %}
{% endblock %}
...@@ -122,6 +122,8 @@ if ($type === 'nojs') { ...@@ -122,6 +122,8 @@ if ($type === 'nojs') {
$t = new SimpleSAML_XHTML_Template($globalConfig, $template_id); $t = new SimpleSAML_XHTML_Template($globalConfig, $template_id);
$t->data['auth_state'] = $id; $t->data['auth_state'] = $id;
$t->data['header'] = $t->t('{logout:progress}');
/** /**
* @deprecated The "id" variable will be removed. Please use "auth_state" instead. * @deprecated The "id" variable will be removed. Please use "auth_state" instead.
*/ */
......
...@@ -9,5 +9,9 @@ if (isset($_REQUEST['retryURL'])) { ...@@ -9,5 +9,9 @@ if (isset($_REQUEST['retryURL'])) {
$globalConfig = SimpleSAML_Configuration::getInstance(); $globalConfig = SimpleSAML_Configuration::getInstance();
$t = new SimpleSAML_XHTML_Template($globalConfig, 'core:no_cookie.tpl.php'); $t = new SimpleSAML_XHTML_Template($globalConfig, 'core:no_cookie.tpl.php');
$t->data['header'] = htmlspecialchars($t->t('{core:no_cookie:header}'));
$t->data['description'] = htmlspecialchars($t->t('{core:no_cookie:description}'));
$t->data['retry'] = htmlspecialchars($t->t('{core:no_cookie:retry}'));
$t->data['retryURL'] = $retryURL; $t->data['retryURL'] = $retryURL;
$t->show(); $t->show();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment