mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Added cookie check with nice error message
This commit is contained in:
@@ -28,6 +28,16 @@
|
||||
|
||||
<div class="embed_container">
|
||||
<div class="container-fluid">
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ message.level_tag }} alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
@@ -3,18 +3,6 @@
|
||||
|
||||
{% block title %}Login{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
console.log("Cookies Enabled: " + navigator.cookieEnabled)
|
||||
if(!navigator.cookieEnabled){
|
||||
$('#loginForm').prop("target", "_blank");
|
||||
$('#cookieWarning').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="text-center">
|
||||
<h1>R<small>ig</small> I<small>nformation</small> G<small>athering</small> S<small>ystem</small></h1>
|
||||
@@ -36,9 +24,6 @@
|
||||
{% render_field form.password class+="form-control" placeholder=form.password.label %}
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<span id="cookieWarning" class="text-warning hidden">
|
||||
Login will happen in new tab (cookies blocked)
|
||||
</span>
|
||||
<input type="submit" value="Login" class="btn btn-primary"/>
|
||||
</div>
|
||||
<input type="hidden" name="next" value="{{ next }}"/>
|
||||
|
||||
Reference in New Issue
Block a user