{% extends "crud/edit.html.twig" %}
{% block formContent %}
    <div class="form-group required">
        <label for="codigo">{% trans %}Código{% endtrans %}</label>
        <input id="codigo" type="text" name="codigo" class="form-control" value="{{ model.codigo }}" maxlength="10" />
    </div>
    <div class="form-group required">
        <label for="nome">{% trans %}Nome{% endtrans %}</label>
        <input id="nome" type="text" name="nome" class="form-control" value="{{ model.nome }}" maxlength="50" />
    </div>
    <div class="form-group required">
        <label for="grupo">{% trans %}Grupo{% endtrans %}</label>
        <select id="grupo" name="grupo_id" class="form-control">
            <option value="">{% trans %}Selecione{% endtrans %}</option>
            {% for item in grupos %}
            <option value="{{ item.id }}" {% if item.id == model.grupo.id %}selected="selected"{% endif %}>{{ item }}</option>
            {% endfor %}
        </select>
    </div>
    <div class="form-group required">
        <label for="status">Status</label>
        <select id="status" name="status" class="form-control">
            <option value="">{% trans %}Selecione{% endtrans %}</option>
            <option value="1" {% if model.status == 1 %}selected="selected"{% endif %}>{% trans %}Ativo{% endtrans %}</option>
            <option value="0" {% if model.status == "0" %}selected="selected"{% endif %}>{% trans %}Inativo{% endtrans %}</option>
        </select>
    </div>
{% endblock %}