<div class="creation">
    <form class="add" method="post" action="{{racine}}/add" enctype="multipart/form-data">
        {% if src == true and char == true %}

            <input type="hidden" id="req" name="req" value="both"/>
            <input type="hidden" id="content" name="content" value="{{ content }}"/>

        {% elseif src == true %}

            <input type="hidden" id="req" name="req" value="src"/>
            <input type="hidden" id="character" name="character" value="{{ charId }}"/>
            <input type="hidden" id="content" name="content" value="{{ content }}"/>

        {% elseif char == true %}

            <input type="hidden" id="req" name="req" value="char"/>
            <input type="hidden" id="src" name="src" value="{{ srcId }}"/>
            <input type="hidden" id="content" name="content" value="{{ content }}"/>

        {% endif %}
        {% if src == true %}
            <h1>Source</h1>
            <label for="titre">Titre de la source *</label>
                <input type="text" class="champ" id="titre" name="titre" placeholder="Titre de la source" required/>
            <label for="date">Année de sortie *</label>
                <input type="number" id="date" name="date" min="1850" max="{{ "now"|date("Y") }}" required>
            <label for="type">Type de source *</label>

                <input type="radio" id="movie" name="type" value="movie" checked>
                <label for="movie">Film</label><br>

                <input type="radio" id="serie" name="type" value="serie">
                <label for="serie">Serie</label>

                <input type="radio" id="vg" name="type" value="video-game">
                <label for="vg">Jeu Vidéo</label><br>

                <input type="radio" id="anime" name="type" value="anime">
                <label for="anime">Anime</label>

        {% endif %}
        {% if char == true %}
            <h1>Personnage</h1>
            <label for="name">Nom de personnage *</label>
                <input type="text" class="champ" id="name" name="name" placeholder="Nom du personnage" required/>

            <label for="name">Image du personnage *</label>
                <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg, imag/jpg" required/>
            
        {% endif %}
        <input type="submit" class="btn" value="Soumettre"/>
    </form>
<body>
<html>