Compare commits

..

2 commits

View file

@ -18,25 +18,25 @@
</metal:empty>
<div metal:fill-slot="body"
tal:define="principal python:request.principal.id;
camefrom python:request.get('camefrom') or request.URL[-1]">
tal:define="principal python:request.principal.id;
camefrom python:request.get('camefrom') or request.URL[-1]">
baseUrl python:request.URL[-1];
<p i18n:translate="" tal:condition="python: principal == 'zope.anybody'">
Please provide Login Information</p>
<p i18n:translate="" tal:condition="python: principal != 'zope.anybody'">
You are not authorized to perform this action. However, you may login as a
different user who is authorized.</p>
<p i18n:domain="loops"
tal:condition="view/oidc_allowed">
<a tal:attributes="href string:/@@auth_login?camefrom=$camefrom"
i18n:translate="login-with-oidc">Login with OpenID Connect (Zitadel)</a>
</p>
<p i18n:domain="loops"
tal:condition="view/oidc_allowed">
<a tal:attributes="href string:$baseUrl/@@auth_login?camefrom=$camefrom"
i18n:translate="login-with-oidc">Login with OpenID Connect (Zitadel)</a>
</p>
<form action="." method="post"
tal:attributes="action request/URL">
<div tal:omit-tag=""
tal:condition="python:principal != 'zope.anybody' and 'SUBMIT' in request">
<span tal:define="dummy python:
request.response.redirect(request.get('camefrom') or request.URL[-1])" />
<span tal:define="dummy python:request.response.redirect(camefrom)" />
</div>
<div class="row">
<div class="label" i18n:translate="">User Name</div>
@ -59,21 +59,21 @@
tal:attributes="value request/camefrom | nothing">
</form>
<div tal:condition="view/showSelection"
i18n:domain="loops">
i18n:domain="loops">
<br>
<p><b i18n:translate="set-authentication-method">Set Authentication Method</b></p>
<p><b i18n:translate="set-authentication-method">Set Authentication Method</b></p>
<span i18n:translate="authentication-method">Authentication Method</span>:
<select name="auth_method"
onchange="document.cookie=`loops_auth_method=${this.value}; path=/`"
tal:define="meth view/authMethod"
tal:attributes="value meth">
<select name="auth_method"
onchange="document.cookie=`loops_auth_method=${this.value}; path=/`"
tal:define="meth view/authMethod"
tal:attributes="value meth">
<option value="legacy" i18n:translate="authentication-method-legacy"
tal:attributes="selected python:meth=='legacy'">Legacy</option>
tal:attributes="selected python:meth=='legacy'">Legacy</option>
<option value="oidc" i18n:translate="authentication-method-oidc"
tal:attributes="selected python:meth=='oidc'">OIDC</option>
tal:attributes="selected python:meth=='oidc'">OIDC</option>
<option value="select" i18n:translate="authentication-method-select"
tal:attributes="selected python:meth=='select'">Selection</option>
</select>
tal:attributes="selected python:meth=='select'">Selection</option>
</select>
</div>
</div>