From f91aa4099a8cc844a11cb0794720ad0e8694e961 Mon Sep 17 00:00:00 2001 From: Stefano Alberto Russo <stefano.russo@gmail.com> Date: Tue, 30 Mar 2021 23:50:19 +0200 Subject: [PATCH] Imporved Open ID Connect support in the UI. --- .../code/rosetta/core_app/templates/login.html | 12 ++++++++++++ .../rosetta/core_app/templates/navigation.html | 16 +++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/services/webapp/code/rosetta/core_app/templates/login.html b/services/webapp/code/rosetta/core_app/templates/login.html index 92bc55c..f61a66a 100644 --- a/services/webapp/code/rosetta/core_app/templates/login.html +++ b/services/webapp/code/rosetta/core_app/templates/login.html @@ -17,6 +17,17 @@ <br /> <input type='submit' style="width:110px" class="btn btn-lg btn-success btn-block" value='Log in' /> + + <div style="margin-top:25px; margin-bottom:15px"> + <font color="#a9a9a9"> — OR —</font> + </div> + + {% if OPENID_ENABLED %} + <a href="{% url 'oidc_authentication_init' %}">Login with OpenID Connect </a> + {% endif %} + + <br /><br /> + {% if data.error %} <br/> <div class='centerbox-error'> @@ -36,6 +47,7 @@ </p> + </form> </div> {% if not data.success %} diff --git a/services/webapp/code/rosetta/core_app/templates/navigation.html b/services/webapp/code/rosetta/core_app/templates/navigation.html index 4696610..e499fcc 100644 --- a/services/webapp/code/rosetta/core_app/templates/navigation.html +++ b/services/webapp/code/rosetta/core_app/templates/navigation.html @@ -51,22 +51,16 @@ </center> </li> <center> - <div style="padding:10px"> - <!-- <a href="/register" class="menulink">Register</a> <b>|</b> --> + {% if OPENID_ENABLED %} + <div style="margin-top:15px;margin-bottom:10px"><font color="#a9a9a9"> — OR —</font></div> + <li style="padding-left:0; text-indent: 0"> <a href="{% url 'oidc_authentication_init' %}" style="padding-left:0; text-indent: 0">Login with OpenID Connect</a></li> + {% endif %} + <div style="padding:10px;"> <font color="gray">Forgot password? Just leave it empty to get a login link by email.</font> </div> </center> {% endif %} - {% if OPENID_ENABLED %} - - <li> - {% if not user.is_authenticated %} - <a href="{% url 'oidc_authentication_init' %}">Login with OpenID Conn. </a> - {% endif %} - </li> - {% endif %} - </ul> -- GitLab