{% extends "layout.html" %}

{% block main %}

<style type="text/css">
.blockMsg {
    font-size: 24pt;
    -moz-border-radius: 0.6em;
    -khtml-border-radius: 0.6em;
    border: 0 !important;
}
</style>

<h1>Shutdown FlexGet</h1>

<p>Terminates the FlexGet WebUI. Your tasks will not run until you re-launch FlexGet.</p>

<script type="text/javascript">
    $(document).ready(function() {
        $("#shutdown").click(function() {
            var ans = confirm("Are you sure you want to quit?")
            if(ans){
                $.blockUI.defaults.overlayCSS.backgroundColor = '#000';
                $.blockUI.defaults.overlayCSS.opacity = .8;
                $.blockUI.defaults.overlayCSS.cursor = 'default';
                $.blockUI({ message: 'See you Space Cowboy...'});
                $('#shutdown').load("{{ url_for('.now') }}");
            }
        });
    });
</script>

<p>
    <a id="shutdown" href="#">Shutdown FlexGet</a>
</p>

{% endblock %}
