<h1>Ajouter une citation</h1>

<form id="form" method="post" action="{{racine}}/validsubmit">

    <div id="box">

        <div class="part">

            <div id="characterField">

                <div id="sourceField">
                    <p>Source *</p>
                <select name="src" id="src">
                    <option value="">--Selectionner une source--</option>
                    {% for val in valuesSource %}
                        <option value="{{val.getIdSource()}}">{{val.title}}</option>
                    {% endfor %}
                     <option value="other">Autre</option>
                </select>

                {% if errors[1] is defined and errors[1] is not empty %}
                    <p style="color: red">{{ errors[1] }}</p>
                {% endif %}
                </div>

                <p>Personnage *</p>
                <select name="character" id="character">
                    <option value="">--Selectionner un personnage--</option>
                    {% for val in valuesPerso %}
                        <option value="{{val.getIdCharacter()}}">{{val.name}}</option>
                    {% endfor %}
                     <option value="other">Autre</option>
                </select>

                {% if errors[0] is defined and errors[0] is not empty %}
                    <p style="color: red">{{ errors[0] }}</p>
                {% endif %}

            </div>

        </div>
        <div class="part">

            <div id="contentField">
                <p>Contenu *</p>
                <textarea id="content" name="content" rows="5" cols="50" required placeholder="écrire la citation..."></textarea>
            </div>

        </div>

        <div id="confirm">
            <input type="submit" class="btn" name="action" value="Soumettre"/>
        </div>

    </div>

</form>

</body>
</html>