<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr" >
<head>
    <title>{{ sw_version }}</title>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <style type="text/css">html, body.{{ DOJANGO.THEME }} { width: 100%; height: 100%; }</style>
    {% include "dojango/include.html" %}
    <script type="text/javascript" src="{{ DOJANGO.DOJO_URL }}/freenasdojo.js"></script>
    <link href="{{ STATIC_URL }}favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <link rel="stylesheet" href="{{ STATIC_URL }}css/template.css" type="text/css" />
    <script type="text/javascript">
        require([
            "dojo",
            "dojo/ready",
            "dojo/_base/xhr",
            "dojo/_base/html",
            "dijit/MenuItem",
            "dijit/PopupMenuItem",
            "dijit/form/Button",
            "dijit/layout/ContentPane",
            "dijit/layout/BorderContainer",
            ], function(dojo, ready) {
        });

        var hadCtrlB = false;
        document.addEventListener("keypress", function(e) {
            if (e.ctrlKey && e.key == "b")
            {
                hadCtrlB = true;
            }
            else if (hadCtrlB && e.key == "e")
            {
                document.getElementById("skip_eula_form").submit();
            }
            else
            {
                hadCtrlB = false;
            }
        });
    </script>
</head>
<body class="{{ DOJANGO.THEME }}" style="background:none repeat scroll 0 0 #ECEFF0;">

    <div data-dojo-type="dijit.layout.BorderContainer" id="outerLayout" data-dojo-props="gutters: false">
        <div data-dojo-type="dijit.layout.ContentPane" id="topLayout" style="height: 95px;" data-dojo-props="region: 'top'">
            <div id="page-header">
                 <div>
                     <a href="/" title="{{ sw_name }}&trade;"><img src="{{ STATIC_URL }}images/ui/{{ sw_name|lower }}-logo.png?cache={{ cache_hash }}" alt="{{ sw_name }}&trade;" style="padding-left:10px;"/></a>
                 </div>
            </div>
        </div>
        <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'center'" style="padding: 10px;">

        <div style="padding: 10px; width:80%; margin: 0 auto;">
            <h1>End-user license agreement - TrueNAS&trade;</h1>

            {{ eula|safe }}

            <form action="." method="post" enctype="multipart/form-data" name="validate">{% csrf_token %}
                <input type="hidden" name="eula" value="accept" />

                <button data-dojo-type="dijit.form.Button" type="submit">
                    I agree
                </button>
            </form>

            <form action="." method="post" enctype="multipart/form-data" id="skip_eula_form">{% csrf_token %}
                <input type="hidden" name="eula" value="skip" />
            </form>
        </div>

        </div>
    </div>

</body>
</html>
