mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-24 11:18:46 +02:00
Add signup link, customize templates
This commit is contained in:
33
templates/cas_server/login.html
Normal file
33
templates/cas_server/login.html
Normal file
@ -0,0 +1,33 @@
|
||||
{% extends "cas_server/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block ante_messages %}
|
||||
{% if auto_submit %}<noscript>{% endif %}
|
||||
<h2 class="form-signin-heading">{% trans "Please log in" %}</h2>
|
||||
{% if auto_submit %}</noscript>{% endif %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "If you don't have any Note Kfet account, please follow <a href='/accounts/signup'>this link to sign up</a>." %}
|
||||
</div>
|
||||
<form class="form-signin" method="post" id="login_form"{% if post_url %} action="{{post_url}}"{% endif %}>
|
||||
{% csrf_token %}
|
||||
{% include "cas_server/form.html" %}
|
||||
{% if auto_submit %}<noscript>{% endif %}
|
||||
<button class="btn btn-primary btn-block btn-lg" type="submit">{% trans "Login" %}</button>
|
||||
{% if auto_submit %}</noscript>{% endif %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% block javascript_inline %}
|
||||
jQuery(function( $ ){
|
||||
$("#id_warn").click(function(e){
|
||||
if($("#id_warn").is(':checked')){
|
||||
createCookie("warn", "on", 10 * 365);
|
||||
} else {
|
||||
eraseCookie("warn");
|
||||
}
|
||||
});
|
||||
});{% if auto_submit %}
|
||||
document.getElementById('login_form').submit(); // SUBMIT FORM{% endif %}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user