cco.member: login page fixes for correct use of authmethod selection and OIDC
This commit is contained in:
parent
d2bff4c5cb
commit
175f68f40a
1 changed files with 6 additions and 5 deletions
|
|
@ -4,7 +4,9 @@
|
||||||
<metal:login define-macro="login_form"
|
<metal:login define-macro="login_form"
|
||||||
i18n:domain="cco.member"
|
i18n:domain="cco.member"
|
||||||
tal:define="principal request/principal/id;
|
tal:define="principal request/principal/id;
|
||||||
camefrom python:request.get('camefrom') or request.URL[-1]">
|
baseUrl python:request.URL[-1];
|
||||||
|
camefrom python:request.get('camefrom') or baseUrl;
|
||||||
|
dummy item/checkAuth">
|
||||||
<p style="color: Red"
|
<p style="color: Red"
|
||||||
tal:condition="request/error_message|nothing"
|
tal:condition="request/error_message|nothing"
|
||||||
i18n:translate=""
|
i18n:translate=""
|
||||||
|
|
@ -12,7 +14,7 @@
|
||||||
<h2 i18n:translate="title_login">Login</h2>
|
<h2 i18n:translate="title_login">Login</h2>
|
||||||
<p i18n:domain="loops"
|
<p i18n:domain="loops"
|
||||||
tal:condition="item/oidc_allowed">
|
tal:condition="item/oidc_allowed">
|
||||||
<a tal:attributes="href string:/@@auth_login?camefrom=$camefrom"
|
<a tal:attributes="href string:$baseUrl/@@auth_login?camefrom=$camefrom"
|
||||||
i18n:translate="login-with-oidc">Login with OpenID Connect (Zitadel)</a>
|
i18n:translate="login-with-oidc">Login with OpenID Connect (Zitadel)</a>
|
||||||
</p>
|
</p>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -23,8 +25,7 @@
|
||||||
tal:define="submitted python:
|
tal:define="submitted python:
|
||||||
principal != 'zope.anybody' and 'SUBMIT' in request">
|
principal != 'zope.anybody' and 'SUBMIT' in request">
|
||||||
<tal:redirect condition="submitted">
|
<tal:redirect condition="submitted">
|
||||||
<span tal:define="dummy python:request.response.redirect(
|
<span tal:define="dummy python:request.response.redirect(camefrom)" />
|
||||||
request.get('camefrom') or request.URL[-1])" />
|
|
||||||
</tal:redirect>
|
</tal:redirect>
|
||||||
<tal:form condition="not:submitted">
|
<tal:form condition="not:submitted">
|
||||||
<input type="hidden" name="base_url"
|
<input type="hidden" name="base_url"
|
||||||
|
|
@ -50,7 +51,7 @@
|
||||||
i18n:attributes="value button_login_2factor" />
|
i18n:attributes="value button_login_2factor" />
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="camefrom"
|
<input type="hidden" name="camefrom"
|
||||||
tal:attributes="value request/camefrom | nothing">
|
tal:attributes="value camefrom">
|
||||||
</tal:form>
|
</tal:form>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue