{% load i18n %}
{% load static %}

<form action="{% url 'registration' event.pk %}" method="post" onsubmit="openLoader()">
    {% csrf_token %}
    <div class="w3-row-padding" style="margin:0 -16px 8px -16px">
        <div class="w3-half">
            <label class="w3-small" for="email_id">Zadej email</label>
            <input class="w3-input w3-border" type="text" id="email_id" placeholder="Email" required name="email"
                   onchange="validateEmail()">
            <span class="w3-small" id="emailError" style="color: red;"></span>
        </div>
        <div class="w3-half">
            <label class="w3-small" for="nick_name_id">Zadej prezivku</label>
            <input class="w3-input w3-border" type="text" id="nick_name_id" placeholder="Prezivka" required name="nick_name">
        </div>
    </div>
    <div class="w3-row-padding" style="margin:0 -16px 8px -16px">
        <div class="w3-half">
            <label class="w3-small" for="first_name_id">Zadej krestni jmeno</label>
            <input class="w3-input w3-border" type="text" id="first_name_id" placeholder="Jmeno" required name="first_name">
        </div>
        <div class="w3-half">
            <label class="w3-small" for="last_name_id">Zadej prijmeni</label>
            <input class="w3-input w3-border" type="text" id="last_name_id" placeholder="Primeni" required name="last_name">
        </div>
    </div>
    <div class="w3-row-padding" style="margin:0 -16px 8px -16px">
        <div class="w3-half">
            <label class="w3-small" for="phone_id">Zadej telefon</label>
            <input class="w3-input w3-border" type="text" id="phone_id" placeholder="Telefon" required name="phone">
        </div>
        <div class="w3-half">
            <label class="w3-small" for="category_id">Zadej kategorii</label>
            <select class="w3-input w3-border" id="category_id" name="category" required>
                <option value="" disabled selected>Zvol kategoriu</option>
                {% for c in event.categories.all %}
                    <option value="{{ c.name }}">{{ c.name }}</option>
                {% endfor %}
            </select>
        </div>
    </div>
    <label class="w3-small" for="text_id">Neco mi napis kdyz chces</label>
    <input class="w3-input w3-border" type="text" id="text_id" placeholder="Text" name="text">
    <button class="w3-button {{ event.get_bg_color }} w3-right w3-section" type="submit"
            id="registration_button">ODESLAT REGISTRACI
    </button>
</form>

