{% extends "admin/base_site.html" %}
{% comment %}
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
{% endcomment %}
{% load proto_tags %}
{% load i18n %}
{% load static from staticfiles %}
{% block extrahead %}
<script type="text/javascript" src="{% static "js/selects.js" %}"></script>
<style>
    div#theader {font-weight:bold; clear:both;}
    div#div_filtro {margin-bottom:15px;}
    div#div_filtro label {width:80px; display:inline-block;}
</style>
{% endblock %}
{% block breadcrumbs %}
    <div class="breadcrumbs">Você está em: 
      <a href="../../">{% trans "Home" %}</a> &rsaquo; 
      <a href="{% url 'rede.views.planejamento' %}">Planejamento por ano</a>
    </div>
{% endblock %}
{% block content %}
    <h1>Planejamento de aquisição de recursos</h1>
    <br>
    <div id="div_filtro">
        <fieldset>
            <legend>Filtro</legend>
            <form method="GET">
                <label for="id_anoproj">Ano</label>
                <select name="anoproj" id="id_anoproj">
                    <option value="" selected>Nenhum</option>
                    {% for ap in anoproj %}
                        <option value="{{ ap.0 }}/{{ ap.1.id }}">{{ ap.0 }} - {{ ap.1 }}</option>
                    {% endfor %}
                </select>
                <br />
                <label for="id_os">OS</label>
                <select name="os" id="id_os">
                    <option value="" selected>Nenhum</option>
                    {% for o in oss %}
                        <option value="{{ o.id }}">{{ o }}</option>
                    {% endfor %}
                </select>
                <br />
                <input type="submit" value="Enviar">
            </form>
        </fieldset>
    </div>
    <script type="text/javascript">
        $("#id_anoproj").on("change", function() {ajax_select_ano_proj();});
    </script>
{% endblock %}
