{% extends 'base.html.twig' %}

{% block title %}
Registrace nového žáka
{% endblock %}

{% block body %}

    {{ form_start(form, {'attr' : {'class' : 'needs-validation', 'novalidate' : true, 'style' : 'min-width: 400px'}}) }}
    <div class="errors">
        {{ form_errors(form) }}
    </div>

    <h3 class="h3 card-title mb-3 font-weight-normal">Registrace nového žáka</h3>

    <br>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Celé jméno</span>
        </div>
        {{ form_widget(form.jmeno) }}
        {{ form_widget(form.prijmeni) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Datum Narození a Rodné číslo</span>
        </div>
        {{ form_widget(form.datNar) }}
        {{ form_widget(form.rodCis) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Pohlaví</span>
        </div>
        {{ form_widget(form.pohlavi) }}
    </div>

    <br>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Profilový obrázek</span>
        </div>
        {{ form_widget(form.image) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Třída:</span>
        </div>
        {{ form_widget(form.trida) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Škola</span>
        </div>
        {{ form_widget(form.skola, {'attr' : {'disabled' : true}}) }}
    </div>

    <br>

    <div class="input-group mb-0">
        <div class="input-group-prepend">
            <span class="input-group-text">Adresa</span>
        </div>
        <div>
            <div class="input-group mb-1">
                <div></div>
                {{ form_widget(form.okres) }}
                {{ form_widget(form.ulice) }}
                {{ form_widget(form.cisPop) }}
            </div>
            <div class="input-group mb-0">
                <div></div>
                {{ form_widget(form.stat) }}
                {{ form_widget(form.mCast) }}
                {{ form_widget(form.psc) }}
            </div>
        </div>
    </div>

    <br>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Identifikační údaje</span>
        </div>
        {{ form_widget(form.op) }}
        {{ form_widget(form.pas) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Státní Občanství</span>
        </div>
        {{ form_widget(form.obcanstvi) }}
        {{ form_widget(form.kv_st_obc) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Zdravotní Pojišťovna</span>
        </div>
        {{ form_widget(form.zdPoj) }}
    </div>

    <br>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Poznámka</span>
        </div>
        {{ form_widget(form.poznamka) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Komunikace</span>
        </div>
        {{ form_widget(form.tel) }}
        {{ form_widget(form.email) }}
    </div>

    <br>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Kód Změny</span>
        </div>
        {{ form_widget(form.kod_zmen) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Předchozí navštěvovaná škola</span>
        </div>
        {{ form_widget(form.predSkol) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Individuální vzdělávací plán</span>
        </div>
        {{ form_widget(form.ind_stud_plan) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Individuální vzdělávací plán</span>
        </div>
        {{ form_widget(form.prizn) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Způsob plnění PŠD</span>
        </div>
        {{ form_widget(form.zpusob) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Zdroj Financování</span>
        </div>
        {{ form_widget(form.fin) }}
    </div>

    <br>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Datum zahájení studia</span>
        </div>
        {{ form_widget(form.datZah) }}
    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Kód Zahájení školní docházky</span>
        </div>
        {{ form_widget(form.zah_doc) }}
    </div>


    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Datum ukončení studia</span>
        </div>
        {{ form_widget(form.datUk) }}

    </div>

    <div class="input-group mb-3">
        <div class="input-group-prepend">
            <span class="input-group-text">Kód ukončení studia</span>
        </div>
        {{ form_widget(form.kod_uk) }}
    </div>

    <br>
    <hr>
    <br>

    <main id="accordion">
            <section id="znevyhodneni" class="card shadow">
                <a href="#znevyhodneni" class="card-header"><h5 class="card-title h6">Údaje Znevýhodnění</h5></a>
                <div class="card-body">
                    <div class="shadow" style="width: max-content;">

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Nadání</span>
                            </div>
                            {{ form_widget(form.nadani) }}
                        </div>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Upravený vzdělávací program</span>
                            </div>
                            {{ form_widget(form.upr_vzd_program) }}
                        </div>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Odlišné kulturní prostředí</span>
                            </div>
                            {{ form_widget(form.odl_kult_prostredi) }}
                        </div>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Úprava očekávaných výstupů vzdělávání</span>
                            </div>
                            {{ form_widget(form.uprava_vyst_vzdel) }}
                        </div>

                        <br>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Identifikátor Znevýhodnění</span>
                            </div>
                            {{ form_widget(form.znevyhodneni) }}
                        </div>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Kategorie Znevýhodnění</span>
                            </div>
                            {{ form_widget(form.kat_znev) }}
                        </div>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Převažující stupeň poskytovaných opatření</span>
                            </div>
                            {{ form_widget(form.pspo) }}
                        </div>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Prodloužená délka vzdělávání</span>
                            </div>
                            {{ form_widget(form.prodl_delka_vzd) }}
                        </div>

                        <br>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Datum vydání doporučení</span>
                            </div>
                            {{ form_widget(form.dat_vyd_doporuc) }}
                        </div>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Datum konce platnosti doporučení</span>
                            </div>
                            {{ form_widget(form.dat_konce_doporuc) }}
                        </div>

                        <br>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Finanční náročnost</span>
                            </div>
                            {{ form_widget(form.fin_narocnost) }}
                        </div>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Kód normované finanční náročnosti</span>
                            </div>
                            {{ form_widget(form.norm_fin_narocnost) }}
                        </div>

                        <br>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Datum zahájení poskytování PO</span>
                            </div>
                            {{ form_widget(form.dat_zah_po) }}
                        </div>

                        <div class="input-group mb-3">
                            <div class="input-group-prepend">
                                <span class="input-group-text">Datum ukončení poskytování PO</span>
                            </div>
                            {{ form_widget(form.dat_uk_po) }}
                        </div>

                    </div>
                </div>
            </section>
    </main>

    <style>
        #accordion section div {
            display: none;
            text-align: center;
        }

        #accordion section a {
            text-align: center;
            color: black;
            text-decoration: none;
        }

        #accordion section a:hover {
            text-decoration: none;
        }

        #accordion section:target div {
            display: block;
        }
    </style>

    <br>

    {{ form_row(form.save) }}

    {{ form_end(form) }}

{% endblock %}

