Skip to content

Commit e4bb90b

Browse files
committed
Fix loginpage_links feature.
It seems with the addition of twig templates another way to process these links (or other links) has been started but which is broken. The original way still remains in the code. Make it clearer which links this concerns by making the template variable more explicit and remove the unused tabs code. Closes: #1770
1 parent 261e36f commit e4bb90b

3 files changed

Lines changed: 3 additions & 20 deletions

File tree

modules/core/src/Controller/Login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ private function handleLogin(Request $request, $source, array $state): Template
291291
$t->data['organizations'] = $organizations;
292292
}
293293
} else {
294-
$t->data['links'] = $source->getLoginLinks();
294+
$t->data['loginpage_links'] = $source->getLoginLinks();
295295
}
296296

297297
$t->data['errorcode'] = $errorCode;

modules/core/templates/base.twig

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,6 @@
33

44
<div id="portalmenu" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
55

6-
<ul class="tabset_tabs ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
7-
8-
{% if links is defined %}
9-
{% for name, link in links %}
10-
{% if name == pageid %}
11-
<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active">
12-
<a href="#">{{ link.text|trans }}</a>
13-
</li>
14-
{% else %}
15-
<li class="ui-state-default ui-corner-top">
16-
<a href="{{ link.href }}">{{ link.text|trans }}</a>
17-
</li>
18-
{% endif %}
19-
{% endfor %}
20-
{% endif %}
21-
22-
</ul>
236
<div id="portalcontent" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
247

258
{{ block('content') }}

modules/core/templates/loginuserpass.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@
110110
</div>
111111
</form>
112112
</div>
113-
{% if links is defined -%}
113+
{% if loginpage_links is defined -%}
114114
<ul>
115-
{% for link in links -%}
115+
{% for link in loginpage_links -%}
116116
<li><a href="{{ link.href }}">{{ link['text']|trans }}</a></li>
117117
{% endfor %}
118118
</ul>

0 commit comments

Comments
 (0)