{% extends "crud/edit.html.twig" %}
{% block formContent %}
    <div class="form-group required">
        <label for="nome" class="control-label">{% 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="descricao" class="control-label">{% trans %}Descrição{% endtrans %}</label>
        <textarea id="descricao" name="descricao" class="form-control" rows="5" maxlength="150">{{ model.descricao }}</textarea>
    </div>
    {% if model.id == 0 or model.left != 1 %}
    <div class="form-group required">
        <label for="pai" class="control-label">{% trans %}Pai{% endtrans %}</label>
        <select id="pai" name="id_pai" class="form-control">
            <option value="">{% trans %}Selecione{% endtrans %}</option>
            {% for item in pais %}
            <option value="{{ item.id }}" {% if item.id == modelParent.id %}selected="selected"{% endif %}>{{ item }}</option>
            {% endfor %}
        </select>
    </div>
    {% endif %}
{% endblock %}