{% extends "card.html" %}
<a class="item" href="/settings">Paramètres</a>
{% block submenu%}
<a class="item" href="/card">Cartes</a>
{% if card is not None %}
<div class="active item">Configuration pour {{card.name}}</div>
{% end %}
{% end %}
{% block body %}
<div class="ui inverted segment">
    <form class="ui inverted form" method="post" action=".">
        <div class="field">
            <label>Nom de la carte</label>
            <input name="name" placeholder="Nom de la carte" type="text" value="{{ card.name if card is not None else '' }}">
        </div>
        <div class="field">
            <label>Nombre d'entrées analogiques</label>
            <input name="nb_input_pins" placeholder="Nombre d'entrées analogiques" type="number" value="{{ card.nb_input_pins if card is not None else '' }}">
        </div>
        <div class="field">
            <label>Nombre de sorties digitales</label>
            <input name="nb_output_pins" placeholder="Nombre de sorties digitales" type="number" value="{{ card.nb_output_pins if card is not None else '' }}">
        </div>

        {% if method is not 'post'%}
        <input name="_method" type="hidden" value="{{method}}" />
        {% end %}
        <button class="ui button" type="submit">Envoyer</button>
    </form>
</div>
{% end %}
