<form id="equipment">
    <div class="card {% if errors %}border-danger{% endif %}">
        <h5 class="card-header">
            Équipement
            <a hx-post="{% url "character:equipment_change" pk=character.pk %}"
               hx-target="#equipment"
               hx-swap="innerHTML"
               class="btn btn-primary btn-sm"
            >
                <i class="fa-solid fa-save"></i> Save
            </a>
        </h5>

        {% if errors %}
            <div class="card-body text-bg-danger">Errors:{{ errors }}</div>
        {% endif %}
        <div class="card-body">
            {% csrf_token %}
            <textarea class="form-control" name="equipment">{{ character.equipment }}</textarea>
        </div>
        <div class="card-footer">
            <div class="row g-1">
                <div class="col-12 col-sm-6">
                    <div class="input-group input-group-sm">
                        <input type="number" min="0" class="form-control" name="money_pp" value="{{ character.money_pp }}">
                        <span class="input-group-text">pp</span>
                    </div>
                </div>
                <div class="col-12 col-sm-6">
                    <div class="input-group input-group-sm">
                        <input type="number" min="0" class="form-control" name="money_po" value="{{ character.money_po }}">
                        <span class="input-group-text">po</span>
                    </div>
                </div>
                <div class="col-12 col-sm-6">
                    <div class="input-group input-group-sm">
                        <input type="number" min="0" class="form-control" name="money_pa" value="{{ character.money_pa }}">
                        <span class="input-group-text">pa</span>
                    </div>
                </div>
                <div class="col-12 col-sm-6">
                    <div class="input-group input-group-sm">
                        <input type="number" min="0" class="form-control" name="money_pc" value="{{ character.money_pc }}">
                        <span class="input-group-text">pc</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
