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

{% block body %}
  {% set name = kursprofil.kursort.name ~ ': ' ~ kursprofil.start|date('d.m.Y') ~ ' - ' ~ kursprofil.end|date('d.m.Y') %}

  <form id="bookingForm" action="ueberblick" method="post" autocomplete="on">

    <input type="hidden" name="kind_id" value="{{user.id}}" />
    <input type="hidden" name="kursprofil_id" value="{{kursprofil.id}}" />
    <input type="hidden" id="overall_price" name="overall_price" value="0" />

    <div id="lumpSumPriceContainer" style="display: none;">
      <table>
        <tr>
          <td id="choosenCourse"></td>
          <td>
            <span class="glyphicon glyphicon-{{ kursprofil.kursort.veranstalter.waehrung }}" aria-hidden="true"></span>
          </td>
          <td>
            <span id="choosenCoursePrice"></span>
          </td>
        </tr>
        <tr id="overallTableRow">
          <td><strong>Gesamtpreis:</strong></td>
          <td>
            <span class="glyphicon glyphicon-{{ kursprofil.kursort.veranstalter.waehrung }}" aria-hidden="true"></span>
          </td>
          <td>
            <span id="lumpSumPriceValue"></span>
          </td>
        </tr>
      </table>
    </div>

    <div class="row margin-top-25">
      {% if buchung is defined %}
        <div class="col-sm-12">
          <strong>Buchung ({{ buchung.id }}):</strong> {{ buchung.prename }} {{ buchung.name }}
        </div>
      {% endif %}
      <div class="col-sm-8">
        <h2>{{ name }}</h2>
      </div>
    </div>

    <div class="row margin-top-15">
      <div class="col-sm-12">
        <label><span class="required">*</span> Pflichtfeld</label>
      </div>
    </div>

    {# Kursprogramme #}
    <div class="row margin-top-10">
      <div class="col-sm-12">
        <strong>Folgende Kursprogramme stehen hier zur Verfügung: <span class="required" style="color: red;">*</span></strong>
      </div>

      {% for kursprogramm in kursprofil.kursort.kursprogramme %}
        {% if buchung is defined and kursprogramm.id == buchung.additionalBookingInfo.program.id %}
          {% set checked = 'checked' %}
        {% else %}
          {% set checked = '' %}
        {% endif %}
        <div class="col-sm-12 form-group sub-form">
            <input type="radio" id="kursprogramm{{ kursprogramm.id }}" {{ checked }} class="kursprogramm" name="kursprogramm" data-name="{{ kursprogramm.name }}" value="{{ kursprogramm.id }}" data-rel="{{ kursprogramm.preis }}" />
            <label for="kursprogramm{{ kursprogramm.id }}">{{ kursprogramm.name }} <strong><span class="glyphicon glyphicon-{{ kursprogramm.veranstalter.waehrung }}" aria-hidden="true"></span>{{ kursprogramm.preis|number_format(2, ',', ',') }}</strong></label>
        </div>
      {% endfor %}
    </div>

    {# Kurse #}
    <div class="row margin-top-25">
      <div class="col-sm-12">
        <strong>Folgende Kurse stehen hier zur Verfügung:</strong>
      </div>
      {% for kurs in kursprofil.kurse %}
        {% set checked = '' %}
        {% if buchung is defined %}
            {% for gebucht in gebuchteKurse %}
              {% if kurs.id == gebucht.id %}
                {% set checked = 'checked' %}
              {% endif %}
            {% endfor %}
        {% endif %}
        <div class="col-sm-offset-1 col-sm-11">
          <div class="row">
            <div class="col-sm-1"><input type="checkbox" {{ checked }} id="kurswoche_{{ loop.index }}" class="form-control kurs_woche" name="kurs[]" value="{{ kurs.id }}" /></div>
            <div class="col-sm-2"><strong>Von:</strong> {{ kurs.start|date('d.m.Y') }}</div>
            <div class="col-sm-2"><strong>bis:</strong> {{ kurs.end|date('d.m.Y') }}</div>
            <div class="col-sm-7">
                {% for option in kurs.kursoptionen %}
                  {% set labelClass = 'label-default' %}
                  {% if buchung is defined and kurs in gebuchteKurse and option in buchung.kursoptionen %}
                    {% set labelClass = 'label-primary' %}
                  {% endif %}
                  <span class="courseOption label {{ labelClass }}" data-rel="{{ option.preis }}" data-label="{{ option.name }}" data-id="{{ option.id }}" data-toggle="tooltip" title="{{ option.beschreibung }}">{{ option.name }}{% if option.preis > 0 %} (<span class="glyphicon glyphicon-{{ option.veranstalter.waehrung }}" aria-hidden="true"></span> {{ option.preis|number_format(2, ',', '.') }}){% endif %}</span>
                {% endfor %}
            </div>
          </div>
        </div>
      {% endfor %}

      {# insert hidden form fields for available course options #}
      {% for option in kursprofil.kursort.veranstalter.kursoptionen if option.kursort == kursprofil.kursort %}
        <input id="kursoption{{ option.id }}" name="kursoption_{{ option.id }}" type="hidden" value="0" />
      {% endfor %}

    </div>

    {# Persönliche Daten #}
    <div class="row margin-top-25">
      <div class="col-sm-12"><strong>Folgende Daten haben wir bereits von Ihnen (bitte ergänzen, wo notwendig):</strong></div>
      <div class="col-sm-10 col-sm-offset-2">
        <div class="row"><div class="col-sm-2"><label>Anrede</label></div><div class="col-sm-10">{{ user.salutation }}</div></div>
        {% if user.title is not empty %}
          <div class="row"><div class="col-sm-2"><label>Titel</label></div><div class="col-sm-10">{{ user.title }}</div></div>
        {% endif %}
        {% if user.firstname is empty %}
          <div class="row"><div class="col-sm-2"><label>Vorname</label></div><div class="col-sm-4"><input required class="form-control" name="childtable_Vorname" type="text" value="" /></div></div>
        {% else %}
          <div class="row"><div class="col-sm-2"><label>Vorname</label></div><div class="col-sm-10">{{ user.firstname }}</div></div>
        {% endif %}
        <div class="row"><div class="col-sm-2"><label>Nachname</label></div><div class="col-sm-10">{{ user.lastname }}</div></div>
        {% if user.childname is empty %}
          <div class="row"><div class="col-sm-2"><label>Name des Kindes</label></div><div class="col-sm-4"><input required class="form-control" name="childtable_Kindname" type="text" value="" /></div></div>
        {% else %}
          <div class="row"><div class="col-sm-2"><label>Name des Kindes</label></div><div class="col-sm-10">{{ user.childname }}</div></div>
        {% endif %}
        {% if user.birthday is null %}
          <div class="row"><div class="col-sm-2"><label>Geburtstag des Kindes</label></div><div class="col-sm-4"><input required class="form-control" name="childtable_Geburt" type="date" value="" /></div></div>
        {% else %}
          <div class="row"><div class="col-sm-2"><label>Geburtstag des Kindes</label></div><div class="col-sm-10">{{ user.birthday|date('d.m.Y') }}</div></div>
        {% endif %}
        {% if user.gender is empty %}
          <div class="row">
            <div class="col-sm-2"><label>Tochter oder Sohn</label></div>
            <div class="col-sm-4">
              <select name="childtable_Tochtersohn" required>
                <option value="0">Bitte wählen</option>
                <option value="Tochter">Tochter</option>
                <option value="Sohn">Sohn</option>
              </select>
            </div>
          </div>
        {% else %}
          <div class="row"><div class="col-sm-2"><label>Tochter oder Sohn</label></div><div class="col-sm-10">{{ user.gender }}</div></div>
        {% endif %}
        {% if user.street is empty %}
          <div class="row"><div class="col-sm-2"><label>Straße</label></div><div class="col-sm-4"><input required class="form-control" name="childtable_Strasse" type="text" value="" /></div></div>
        {% else %}
          <div class="row"><div class="col-sm-2"><label>Straße</label></div><div class="col-sm-10">{{ user.street }}</div></div>
        {% endif %}
        {% if user.zip is empty %}
          <div class="row"><div class="col-sm-2"><label>PLZ</label></div><div class="col-sm-4"><input required class="form-control" name="childtable_PLZ" type="text" value="" /></div></div>
        {% else %}
          <div class="row"><div class="col-sm-2"><label>PLZ</label></div><div class="col-sm-10">{{ user.zip }}</div></div>
        {% endif %}
        {% if user.city is empty %}
          <div class="row"><div class="col-sm-2"><label>Ort</label></div><div class="col-sm-4"><input required class="form-control" name="childtable_Ort" type="text" value="" /></div></div>
        {% else %}
          <div class="row"><div class="col-sm-2"><label>Ort</label></div><div class="col-sm-10">{{ user.city }}</div></div>
        {% endif %}
        <div class="row"><div class="col-sm-2"><label>Land</label></div><div class="col-sm-10">{{ user.country }}</div></div>
        {% if user.phone is empty %}
          <div class="row"><div class="col-sm-2"><label>Telefon</label></div><div class="col-sm-4"><input required class="form-control" name="childtable_Privat" type="text" value="" /></div></div>
        {% else %}
          <div class="row"><div class="col-sm-2"><label>Telefon</label></div><div class="col-sm-10">{{ user.phone }}</div></div>
        {% endif %}
        {% if user.mobile is empty %}
          <div class="row"><div class="col-sm-2"><label>Mobil</label></div><div class="col-sm-4"><input required class="form-control" name="childtable_Mobil" type="text" value="" /></div></div>
        {% else %}
          <div class="row"><div class="col-sm-2"><label>Mobil</label></div><div class="col-sm-10">{{ user.mobile }}</div></div>
        {% endif %}
        {% if user.email is empty %}
          <div class="row"><div class="col-sm-2"><label>E-Mail</label></div><div class="col-sm-4"><input required class="form-control" name="childtable_Email" type="text" value="" /></div></div>
        {% else %}
          <div class="row"><div class="col-sm-2"><label>E-Mail</label></div><div class="col-sm-10">{{ user.email }}</div></div>
        {% endif %}
        {% set mobileChild = '' %}
        {% if buchung is defined %}
          {% set mobileChild = buchung.additionalBookingInfo.mobileChild %}
        {% endif %}
        <div class="row"><div class="col-sm-2"><label>Mobil-Nummer des Kindes <span class="required">*</span></label></div><div class="col-sm-4"><input required class="form-control" name="mobil_kind" type="text" value="{{ mobileChild }}" /></div></div>
        {% set emailChild = '' %}
        {% if buchung is defined %}
          {% set emailChild = buchung.additionalBookingInfo.emailChild %}
        {% endif %}
        <div class="row"><div class="col-sm-2"><label>E-Mail des Kindes</label></div><div class="col-sm-4"><input class="form-control" name="email_kind" type="text" value="{{ emailChild }}" /></div></div>
        {% set idcardNumberChild = '' %}
        {% if buchung is defined %}
          {% set idcardNumberChild = buchung.additionalBookingInfo.idcardNumberChild %}
        {% endif %}
        <div class="row"><div class="col-sm-2"><label>Reisepass- oder Personalausweiß-Nummer des Kindes <span class="required">*</span></label></div><div class="col-sm-4"><input required class="form-control" name="idcardnummer_kind" type="text" value="{{ idcardNumberChild }}" /></div></div>

      </div>
      <div class="col-sm-12 form-inline">
        <div class="row">
          <div class="col-sm-3">
            <label for="shareroom">Ihr Kind möchte sein Zimmer teilen mit (nicht garantiert): </label>
          </div>
          <div class="col-sm-9">
            {% set shareroom = '' %}
            {% if buchung is defined %}
              {% set shareroom = buchung.additionalBookingInfo.room %}
            {% endif %}
            <input style="margin-left: 105px" id="shareroom" class="form-control" name="shareroom" type="text" value="{{ shareroom }}" />
          </div>
        </div>
      </div>
    </div>

    <div class="row margin-top-25">
      <div class="col-sm-12"><strong>Folgende Bezahl-Verfahren stehen zur Verfügung:</strong> <label><span class="required">*</span></label></div>
      <div class="col-sm-10 col-sm-offset-2 margin-bottom-25">
        {% for bezahlverfahren in kursprofil.kursort.veranstalter.bezahlTypen %}
          {% if buchung is defined and bezahlverfahren.id == buchung.additionalBookingInfo.paymentType %}
            {% set checked = 'checked' %}
          {% else %}
            {% set checked = '' %}
          {% endif %}
          <label class="radio-inline">
            <input type="radio" required name="bezahlverfahren" {{ checked }} id="{{ bezahlverfahren.name }}" value="{{ bezahlverfahren.id }}"> <span class="label label-primary">{{ bezahlverfahren.name }}</span>
          </label>
        {% endfor %}
      </div>

      {% set visible = ' hidden' %}
      {% if buchung is defined and buchung.additionalBookingInfo.paymentType in [1,2] %}
        {% set visible = '' %}
      {% endif %}
      <div class="col-sm-10 col-sm-offset-2{{ visible }} additionalPaymentFields" id="creditcard">
        <div class="form-group">
          {% set cardNumber = '' %}
          {% if buchung is defined %}
            {% set cardNumber = buchung.additionalBookingInfo.cardNumber %}
          {% endif %}
          <label for="cardnumber">Karten-Nummer</label>
          <input type="text" id="cardnumber" name="cardnumber" placeholder="Bitte Karten-Nummer eingeben" value="{{ cardNumber }}" />
        </div>
        <div class="form-inline">
          <div class="form-group">
            {% set validUntil = '' %}
            {% if buchung is defined %}
              {% set validUntil = buchung.additionalBookingInfo.validUntil %}
            {% endif %}
            <label for="expiry">Gültig bis</label>
            <input type="text" id="expiry" name="expiry" placeholder="MM/JJJJ" value="{{ validUntil }}"/>
          </div>
          <div class="form-group">
            {% set cvc = '' %}
            {% if buchung is defined %}
              {% set cvc = buchung.additionalBookingInfo.cvc %}
            {% endif %}
            <label for="cvc">CVC</label>
            <input type="text" id="cvc" name="cvc" value="{{ cvc }}" />
          </div>
        </div>
        <div class="form-group">
          {% set cardholder = '' %}
          {% if buchung is defined %}
            {% set cardholder = buchung.additionalBookingInfo.cardholder %}
          {% endif %}
          <label for="cardowner">Karten-Inhaber</label>
          <input type="text" id="cardowner" name="cardowner" placeholder="Bitte Name eingeben" value="{{ cardholder }}" />
          <p class="help-block">(wenn abweichend von persönlichen Angaben)</p>
        </div>
      </div>
    </div>

    {% set visible = ' hidden' %}
    {% if buchung is defined and buchung.additionalBookingInfo.paymentType == 3 %}
      {% set visible = '' %}
    {% endif %}
    <div class="col-sm-10 col-sm-offset-2{{ visible }} additionalPaymentFields" id="banking">
      <div class="form-group">
        <label for="iban">IBAN</label>
        <input type="text" id="iban" name="iban" placeholder="Bitte IBAN eingeben" class="form-control" />
      </div>
      <div class="form-group">
        <label for="bankname">Bank</label>
        <input type="text" id="bankname" name="bankname" placeholder="wird ermittelt" disabled class="form-control" />
      </div>
      <div class="form-group">
        <label for="bic">BIC</label>
        <input type="text" id="bic" name="bic" placeholder="wird ermittelt" disabled class="form-control" />
      </div>
      <div class="form-group">
        <label for="accountholder">Konto-Inhaber</label>
        <input type="text" id="accountholder" name="accountholder" placeholder="Bitte Name eingeben" class="form-control" />
        <p class="help-block">(wenn abweichend von persönlichen Angaben)</p>
      </div>
    </div>

    <div class="row margin-top-25">
      <div class="col-sm-12"><strong>Ernährung / Gesundheit:</strong></div>
      <div class="col-sm-12 form-inline">
        {% for item in healthCare %}
          {% set checked = '' %}
          {% if buchung is defined %}
          {% for healthCareOption in buchung.healthcareOptions %}
            {% if item.id == healthCareOption.id  %}
              {% set checked = 'checked' %}
            {% endif %}
          {% endfor %}
          {% endif %}
          <input id="hc{{item.id}}" type="checkbox" name="healthCare[]" value="{{item.id}}" {{ checked }} class="form-control checkbox-healthcare" />
          <label for="hc{{item.id}}">{{ item.name }}</label>
        {% endfor %}
      </div>
      {% set healthCareOptions = '' %}
      {% if buchung is defined %}
        {% set healthCareOptions = buchung.additionalBookingInfo.healthCareOptions %}
      {% endif %}
      <div class="col-sm-6 form-group" style="display: none">
        <label for="additionalHealthCareInfos">Erläuterungen:</label>
        <textarea id="additionalHealthCareInfos" name="additionalHealthCareInfos" rows="5" cols="10" class="form-control">{{ healthCareOptions }}</textarea>
      </div>
      <div class="col-sm-6"></div>
    </div>

    <!-- BLOCK: Gebuehren -->
    <div class="row margin-top-25">
      <div class="col-sm-12">
        <strong>Kosten für Transfer:</strong>
      </div>
      <div class="col-sm-12">
        {% for gebuehr in kursprofil.kursort.veranstalter.gebuehren %}
          {% set checked = '' %}
          {% if buchung is defined %}
            {% for fee in buchung.providerFees %}
              {% if gebuehr.id == fee.id %}
                {% set checked = 'checked' %}
              {% endif %}
            {% endfor %}
          {% endif %}
          <div class="col-sm-12 form-group sub-form">
            <input type="checkbox" id="gebuehr{{ gebuehr.id }}" {{ checked }} class="gebuehr" name="gebuehr[]" data-name="{{ gebuehr.name }}" value="{{ gebuehr.id }}" data-rel="{{ gebuehr.preis }}" />
            <label for="gebuehr{{ gebuehr.id }}">{{ gebuehr.name }} <strong><span class="glyphicon glyphicon-{{ gebuehr.veranstalter.waehrung }}" aria-hidden="true"></span>{{ gebuehr.preis }}</strong></label>
          </div>
        {% endfor %}
      </div>
    </div>

    <div class="row margin-top-25">
      <div class="col-sm-12">
        <strong>Notfall-Kontakt:</strong>
        <span style="font-size: 0.8em">(Bitte bevorzugten Kontakt auswählen)</span>
      </div>
      <div class="col-sm-6">
        <div class="form-inline">
          {% set contact1_prefered = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 0 and buchung.emergencyContacts[0].isPrefered %}
            {% set contact1_prefered = 'checked' %}
          {% endif %}
          <label for="contact1">Kontakt 1:</label>
          <input type="radio" id="contact1" name="contact" value="1" class="form-control" {{ contact1_prefered }} />
        </div>
        <div class="form-group sub-form">
          {% set contact1_name = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 0 %}
            {% set contact1_name = buchung.emergencyContacts[0].name %}
          {% endif %}
          <label for="contact1_name">Name</label>
          <input type="text" id="contact1_name" name="contact1_name" class="form-control" value="{{ contact1_name }}" />
        </div>
        <div class="form-group sub-form">
          {% set contact1_relation = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 0 %}
            {% set contact1_relation = buchung.emergencyContacts[0].relation %}
          {% endif %}
          <label for="contact1_relation">Beziehung zum Kind</label>
          <input type="text" id="contact1_relation" name="contact1_relation" class="form-control" value="{{ contact1_relation }}" />
        </div>
        <div class="form-group sub-form">
          {% set contact1_phone_work = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 0 %}
            {% set contact1_phone_work = buchung.emergencyContacts[0].phoneWork %}
          {% endif %}
          <label for="contact1_phone_work">Telefon (Arbeit)</label>
          <input type="text" id="contact1_phone_work" name="contact1_phone_work" class="form-control" value="{{ contact1_phone_work }}" />
        </div>
        <div class="form-group sub-form">
          {% set contact1_phone_home = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 0 %}
            {% set contact1_phone_home = buchung.emergencyContacts[0].phoneHome %}
          {% endif %}
          <label for="contact1_phone_home">Telefon (Privat)</label>
          <input type="text" id="contact1_phone_home" name="contact1_phone_home" class="form-control" value="{{ contact1_phone_home }}" />
        </div>
        <div class="form-group sub-form">
          {% set contact1_mobile = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 0 %}
            {% set contact1_mobile = buchung.emergencyContacts[0].phoneMobile %}
          {% endif %}
          <label for="contact1_mobile">Telefon (Mobil)</label>
          <input type="text" id="contact1_mobile" name="contact1_mobile" class="form-control" value="{{ contact1_mobile }}" />
        </div>
        <div class="form-group sub-form">
          {% set contact1_email = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 0 %}
            {% set contact1_email = buchung.emergencyContacts[0].email %}
          {% endif %}
          <label for="contact1_email">E-Mail</label>
          <input type="text" id="contact1_email" name="contact1_email" class="form-control" value="{{ contact1_email }}" />
        </div>
      </div>

      <div class="col-sm-6">
        <div class="form-inline">
          {% set contact2_prefered = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 1 and buchung.emergencyContacts[1].isPrefered %}
            {% set contact2_prefered = 'checked' %}
          {% endif %}
          <label for="contact2">Kontakt 2:</label>
          <input type="radio" id="contact2" name="contact" value="2" class="form-control" {{ contact2_prefered }} />
        </div>
        <div class="form-group sub-form">
          {% set contact2_name = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 1 %}
            {% set contact2_name = buchung.emergencyContacts[1].name %}
          {% endif %}
          <label for="contact2_name">Name</label>
          <input type="text" id="contact2_name" name="contact2_name" class="form-control" value="{{ contact2_name }}" />
        </div>
        <div class="form-group sub-form">
          {% set contact2_relation = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 1 %}
            {% set contact2_relation = buchung.emergencyContacts[1].relation %}
          {% endif %}
          <label for="contact2_relation">Beziehung zum Kind</label>
          <input type="text" id="contact2_relation" name="contact2_relation" class="form-control" value="{{ contact2_relation }}" />
        </div>
        <div class="form-group sub-form">
          {% set contact2_phone_work = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 1 %}
            {% set contact2_phone_work = buchung.emergencyContacts[1].phoneWork %}
          {% endif %}
          <label for="contact2_phone_work">Telefon (Arbeit)</label>
          <input type="text" id="contact2_phone_work" name="contact2_phone_work" class="form-control" value="{{ contact2_phone_work }}" />
        </div>
        <div class="form-group sub-form">
          {% set contact2_phone_home = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 1 %}
            {% set contact2_phone_home = buchung.emergencyContacts[1].phoneHome %}
          {% endif %}
          <label for="contact2_phone_home">Telefon (Privat)</label>
          <input type="text" id="contact2_phone_home" name="contact2_phone_home" class="form-control" value="{{ contact2_phone_home }}" />
        </div>
        <div class="form-group sub-form">
          {% set contact2_mobile = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 1 %}
            {% set contact2_mobile = buchung.emergencyContacts[1].phoneMobile %}
          {% endif %}
          <label for="contact2_mobile">Telefon (Mobil)</label>
          <input type="text" id="contact2_mobile" name="contact2_mobile" class="form-control" value="{{ contact2_mobile }}" />
        </div>
        <div class="form-group sub-form">
          {% set contact2_email = '' %}
          {% if buchung is defined and buchung.emergencyContacts|length > 1 %}
            {% set contact2_email = buchung.emergencyContacts[1].email %}
          {% endif %}
          <label for="contact2_email">E-Mail</label>
          <input type="text" id="contact2_email" name="contact2_email" class="form-control" value="{{ contact2_email }}" />
        </div>
      </div>

    </div>


    <div class="row margin-top-25 margin-bottom-30">
      <div class="col-sm-6">
        {% if buchung is not defined %}
        <button id="submit-button" type="submit" class="btn btn-primary">Weiter zur Zusammenfassung</button>
        {% endif %}

        {% if buchung is defined %}
          <button id="submit-button" type="submit" class="btn btn-danger">Veränderte Buchung speichern</button>
        {% endif %}
      </div>
    </div>
  </form>

  <script id="hidden-template" type="text/x-custom-template">
    <tr class="tableOptions"><td><TEXT></td><td><span class="glyphicon glyphicon-{{ kursprofil.kursort.veranstalter.waehrung }}" aria-hidden="true"></span></td><td><VALUE></td></tr>
  </script>

  <!-- Kursprogramm Modal -->
  <div class="modal fade" id="hint-course-first" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title" id="confirmModalLabel">Hinweis</h4>
        </div>
        <div class="modal-body">
          Bitte wählen Sie zuerst ein Kursprogramm und mindestens eine Kurswoche?
        </div>
        <div class="modal-footer">
          <button class="btn btn-primary btn-ok" data-dismiss="modal">OK</button>
        </div>
      </div>
    </div>
  </div>

  <!-- Kurswoche Modal -->
  <div class="modal fade" id="hint-course-week" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title" id="confirmModalLabel">Hinweis</h4>
        </div>
        <div class="modal-body">
          TEXT
        </div>
        <div class="modal-footer">
          <button class="btn btn-primary btn-ok" data-dismiss="modal">OK</button>
        </div>
      </div>
    </div>
  </div>
{% endblock %}

{% block javascripts %}
  <script src="/libs/betterschool/buchung.js"></script>
{% endblock %}