Skip to content
Snippets Groups Projects
Unverified Commit cab879d9 authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Start using the new attribute translations

parent 977940ec
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,8 @@ class Controller
$attributes = $auth->getAttributes();
$t = new Template($this->config, 'auth_status.twig', 'attributes');
$l = $t->getLocalization();
$l->addDomain($l->getLocaleDir(), 'attributes');
$t->data['header'] = '{status:header_saml20_sp}';
$t->data['attributes'] = $attributes;
$t->data['nameid'] = !is_null($auth->getAuthData('saml:sp:NameID'))
......
......@@ -17,9 +17,8 @@
{% embed '_table.twig' -%}
{% block namecol -%}
{% set attr = ('{attributes:attribute_'~(name|lower)~'}') %}
{% set translated = attr|trans %}
<td class="attrname">{% if translated != attr %} {{ translated }} <br>{% endif %} <samp>{{ name }}</samp></td>
{% set translated = name|trans %}
<td class="attrname">{% if translated != name %} {{ translated }} <br>{% endif %} <samp>{{ name }}</samp></td>
{% endblock %}
......
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