Comment 13 for bug 1392855

Revision history for this message
Don Bowman (donbowman) wrote :

In templates/auth/login.html, add
<div class="alert alert-success" role="alert" id=motd></div>

<script>
$(document).ready(function() {
        $.get("/motd.json",function(data) {
                var el = document.getElementById("motd");
                var offset = 80 + data.length * 20;
                data.forEach(function(item) {
                        el.innerHTML += "<p>" + item.msg + "</p>";
                        $(".login").css("top",offset.toString() + "px");
                });
        })
});
</script>

after the include of auth/_login.html

then, on your web server, add /motd.json as
[
 { "msg": "this is my message" },
 { "msg":"this is another message" }
]

and it will put these above the login screen as a message of the day.