<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head>
    <title>{% block title %}{% endblock %} | {{setup.installation_name}}</title>
    <META NAME="Copyright" CONTENT="2007-2010, nocproject.org" />
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate" />
    <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% load adminmedia %}{% admin_media_prefix %}css/ie.css{% endblock %}" /><![endif]-->
    {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %}
    <meta name="robots" content="NONE,NOARCHIVE" />
    <link rel="stylesheet" type="text/css" href="/static/css/login.css" />
    <SCRIPT TYPE="text/javascript" SRC="{% admin_media_prefix %}js/jquery.js"></SCRIPT>
</head>
{% load i18n %}
<body>
    <script type="text/javascript">
        // Center login form on a screen
        $(document).ready(function(){
            var $login=$(".login");
            var top=($(window).height()-$login.outerHeight())/2;
            var left=($(window).width()-$login.outerWidth())/2;
            $login.css({position:'absolute',
                margin:0,
                top: (top>0?top:0)+'px',
                left: (left>0?left:0)+'px'});
            $("#id_username").focus();
        });
        
        function animate_fail() {
            $(".login").animate({left: "-=20px"},250, function() {
                $(".login").animate({right: "+=20px"},250);
            });
        }
    </script>
    <div class="login">
        <div class="banner"><img src="{{setup.logo_url}}" width="{{setup.logo_width}}" height="{{setup.logo_height}}" alt="logo" style="float: left; margin: 0px 4px 0px 4px"/>{{setup.installation_name}}</div>
        <form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
            {% include "includes/noc_fieldset.html" %}
            {% if form.errors %}
                {{form.non_field_errors}}
            {% endif %}
            <div class="buttons">
                <input type="submit" value="{% trans 'Log in' %}" class="default" />
            </div>
            {% if form.errors %}<script>$(document).ready(animate_fail);</script>{% endif %}
        </form>
        <div class="copyright">&copy;2007-2011, <a href="http://redmine.nocproject.org/projects/noc">nocproject.org</a></div>
    </div>
<style>
.module {
    border: none;
}
</style>
</body>
