{% extends "custom_field.tpl.html" %}
<!-- $Id: custom_field_text.tpl.html,v 1.1.2.2 2026/03/16 13:14:16 rtigero Exp $ -->

{% block field %}
    {% for value in custom_field.VALUES %}
        <div class="pmb-custom-field-input-group">
            <input id="{{ custom_field.NAME }}_{{ loop.counter0 }}" type="text" size="{{ custom_field.SIZE }}" maxlength="{{ custom_field.MAXSIZE }}" name="{{ custom_field.NAME }}[]" value="{{ value }}" class="pmb-input" aria-describedby="pmb-input-{{ custom_field.NAME }}-desc-error" />
            {% if loop.last %}
                <button type="button" id="{{ custom_field.NAME }}_add" class="bouton" onclick="custom_field_add('{{ custom_field.NAME }}')" aria-label="{{ msg.custom_fields_add_aria_label | printf custom_field.TITRE }}">{{ msg.custom_fields_add_button }}</button>
            {% endif %}
            {% if loop.counter0 > 0 %}
                <button type="button" id="{{ custom_field.NAME }}_remove_{{ loop.counter0 }}" class="bouton" onclick="custom_field_remove(this, '{{ custom_field.NAME }}')" aria-label="{{ msg.custom_fields_raz_aria_label | printf custom_field.TITRE }}">{{ msg.custom_fields_raz_button }}</button>
            {% endif %}
        </div>
    {% endfor %}
    <p id="pmb-input-{{ custom_field.NAME }}-desc-error" class="pmb-input-message visually-hidden" role="alert" aria-live="polite"></p>
{% endblock %}
