mirror of
https://github.com/Mailu/Mailu.git
synced 2025-06-08 23:46:30 +02:00
moved javascript to app.js
This commit is contained in:
parent
b48779ea70
commit
aaf3ddd002
core/admin
@ -66,5 +66,12 @@ $('document').ready(function() {
|
|||||||
// init clipboard.js
|
// init clipboard.js
|
||||||
new ClipboardJS('.btn-clip');
|
new ClipboardJS('.btn-clip');
|
||||||
|
|
||||||
|
// disable login if not possible
|
||||||
|
var l = $('#login_needs_https');
|
||||||
|
if (l.length && window.location.protocol != 'https:') {
|
||||||
|
l.removeClass("d-none");
|
||||||
|
$('form :input').prop('disabled', true);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -8,14 +8,11 @@
|
|||||||
{% trans %}to access the administration tools{% endtrans %}
|
{% trans %}to access the administration tools{% endtrans %}
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
|
|
||||||
{%+ block content %}
|
|
||||||
{% if config["SESSION_COOKIE_SECURE"] %}
|
{% if config["SESSION_COOKIE_SECURE"] %}
|
||||||
<script language="javascript">
|
{%- block content %}
|
||||||
if(window.location.protocol != "https:") {
|
<div id="login_needs_https" class="alert alert-danger d-none" role="alert">
|
||||||
document.write('<div class="alert alert-danger" role="alert">The login form has been disabled as <b>SESSION_COOKIE_SECURE</b> is on but you are accessing Mailu over HTTP</div>');
|
{% trans %}The login form has been disabled as <b>SESSION_COOKIE_SECURE</b> is on but you are accessing Mailu over HTTP.{% endtrans %}
|
||||||
window.stop();
|
</div>
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{% endif %}
|
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
{%+ endblock %}
|
{%- endblock %}
|
||||||
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user