{% extends "crud/detail.html" %} {% load i18n %} {% block actions %} {% endblock %} {% block detail_content %} <form method="POST"> {% csrf_token %} <fieldset> <legend>Escolha da Legislatura e da Sessão Legislativa</legend> <ul class="small-block-grid-2 medium-block-grid-2 large-block-grid-2"> <li> <label>Escolha uma Legislatura</label> <select name="legislatura" onChange="form.submit();"> {% for l in legislaturas %} <option value="{{l.id}}" {% if l == legislatura_selecionada %} selected {% endif %}> {{l}} </option> {% endfor %} </select> </li> <li> <label>Escolha uma Sessão Legislativa</label> <select name="sessao" onChange="form.submit();"> {% for s in sessoes %} <option value="{{s.id}}" {% if s == sessao_selecionada %} selected {% endif %}> {{s}} </option> {% endfor %} </select> </li> </ul> </fieldset> <fieldset> <legend>Escolha da Composição da Mesa Diretora</legend> <ul class="small-block-grid-3 medium-block-grid-3 large-block-grid-3"> <li> <label>Composição da Mesa Diretora</label> <select multiple size="5" name="composicao_mesa"> {% for p in composicao_mesa %} <option value="{{p.parlamentar.id}}:{{p.cargo.id}}"> {{p.parlamentar}} || {{p.cargo}} </option> {% endfor %} </select> </li> <li> {% if cargos_vagos %} <input type="submit" name="Incluir" Value="Incluir" class="button primary" /> {% endif %} <br /> <br /> <input type="submit" name="Excluir" Value="Excluir" class="button primary" /> </li> {% if cargos_vagos %} <li> <label>Parlamentares</label> <select name="parlamentar" id="parlamentar"> {% for p in parlamentares %} <option value="{{p.id}}">{{p.nome_completo}}</option> {% endfor %} </select> <select name="cargo" id="cargo"> {% for c in cargos_vagos %} <option value="{{c.id}}">{{c}}</option> {% endfor %} </select> </li> {% endif %} </ul> </fieldset> </form> {% endblock detail_content %}