Commit 145ca246 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

New login method templates

parent 970a7451
......@@ -109,3 +109,7 @@ img[align="right"] { margin:0 0 0.5em 1em; }
.button:hover { background-color: #3582AC;}
.button.wide { display: block;}
span.action-desc { display: block; color: #fff;}
.button:visited { color: #fff !important }
/* heading extra */
h2 .header-actions { float: right; font-size: 0.8em;}
......@@ -509,4 +509,9 @@ form.withlabels.hidden-submit { margin-bottom:4em; }
.auth_methods .dialog-wrap { display:inline; position:relative; }
.auth_methods .dialog { background:#fff; border:1px dashed #ccc; position:absolute; bottom:30px; left:0; padding:15px; width:220px; display:none;}
.auth_methods .dialog .submit { min-width:30px; padding:5px 22px; }
.right-align { text-align:right; }
\ No newline at end of file
.right-align { text-align:right; }
/* login section */
.login-section {}
.main-login-method { margin-bottom: 20px;}
<form action="{% url astakos.im.target.local.login %}" method="post"class="login innerlabels">{% csrf_token %}
<h2>LOGIN</h2>
{% with login_form as form %}
{% include "im/form_render.html" %}
{% endwith %}
......
<form action="{% url astakos.im.target.local.login %}" method="post"
<form action="{% url astakos.im.target.local.login %}#other-login-methods" method="post"
class="login-form login innerlabels">{% csrf_token %}
<h2 class="form-toggler"><a href="#">LOGIN USING YOUR LOCAL ACCOUNT</a></h2>
<div class="login-form" style="display:none">
<p>if you already have a username and password</p>
<Br />
<div class="login-form" style="display:block">
{% with login_form as form %}
{% include "im/form_render.html" %}
{% endwith %}
......@@ -21,14 +22,3 @@
</div>
</div>
</form>
<script>
$(document).ready(function(){
$("h2.form-toggler a").click(function(e) {
e.preventDefault();
$("div.login-form").slideToggle();
});
if ($('form.login-form .form-row.with-errors, form.login-form .form-error').length > 0) {
$('div.login-form').css({display:'block'});
};
})
</script>
new to okeanos ?
<br />
New to okeanos ?
<a href="{% url astakos.im.views.signup %}{% ifnotequal code "" %}?code={{ code|urlencode }}{% endifnotequal %}">
{{ provider.get_create_prompt_display }}
</a>
......
<h2><a href="/im/login/shibboleth">LOGIN OR CREATE ACCOUNT USING SHIBBOLETH</a></h2>
<p>
If you are a student/researcher/faculty you can login using your university
credentials in the following page
</p>
<br />
<a class="button" href="/im/login/shibboleth">ACADEMIC LOGIN</a>
LOGIN using
LOGIN or SIGNUP using
<a href="/im/login/shibboleth?{% ifnotequal next "" %}&next={{ next|urlencode }}{% endifnotequal %}{% ifnotequal code ""%}{% if next != "" %}&{% else %}?{% endif %}code={{ code }}{% endifnotequal %}"
alt="{{ provider.get_title_display }}">{{ provider.get_title_display }}</a>
......@@ -9,21 +9,48 @@
{% block body.right %}
{% include master_auth_provider.login_template %}
<div class="login-section">
<div class="extralogin">
<h2 class="clearfix"><span class="title">LOGIN</span> <span class="header-actions">
<a class="other-logins" href="#other-login-methods">other login methods</a></span>
</h2>
<div class="main-login-method">
{% include master_auth_provider.login_template %}
</div>
<div class="extralogin" style="display:none">
{% for provider in auth_providers %}
{% if not provider == master_auth_provider %}
{% include provider.login_prompt_template %}
<br />
{% endif %}
{% endfor %}
</div><br />
<div class="bottom">
{% block body.signup %}
{% for provider in auth_providers %}
{% include provider.signup_prompt_template %}
{% endfor %}
<div class="bottom">
{% block body.signup %}
{% for provider in auth_providers %}
{% include provider.signup_prompt_template %}
{% endfor %}
{% endblock body.signup %}
</div>
</div>
</div>
{% endblock body.signup %}
<script>
$(document).ready(function(){
if (window.location.toString().match(/#other-login-methods/)) {
$(".extralogin").show();
}
$(".other-logins").click(function(e){
e.preventDefault();
$(".extralogin").slideToggle();
if (window.location.toString().match(/#other-login-methods/)) {
window.location = window.location.hash = "#"
} else {
window.location = window.location.hash = "#other-login-methods"
}
})
});
</script>
{% endblock body.right%}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment