<html
  xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
  xmlns:cal="http://typo3.org/ns/Ig/IgReservations/ViewHelpers"
  xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
  xmlns:dp="http://typo3.org/ns/Internetgalerie/IgDatapoolFe/ViewHelpers"
  data-namespace-typo3-fluid="true">
<div>
    <div>
        <f:if condition="{calendar.isDateTimeMode}">
          <f:then>
            <dp:form.hiddenDate property="startDate" value="{eventStartDate}" />
            <dp:form.hiddenDate property="endDate" value="{eventEndDate}" />
            <f:form.hidden property="startTime" value="{eventStartDate->f:format.date(format: '%H:%M:%S')}" />
          </f:then>
          <f:else>
                    <f:form.hidden property="timeslot" value="{timeslot.uid}" />
          </f:else>
        </f:if>
        <f:form.hidden property="calendar" value="{calendar.uid}" />
        <f:form.hidden name="redirect" value="{redirect}" />
        <f:form.hidden name="date" value="{date->f:format.date(format: 'Y-m-d')}" />
        <f:comment>
            <f:form.hidden property="startDate" value="{event.startDate->f:format.date(format: 'Y-m-d')}" />
            <f:form.hidden property="endDate" value="{event.endDate->f:format.date(format: 'Y-m-d')}" />
            <f:form.hidden property="startTime" value="{event.startTime}" />
            <f:form.hidden property="endTime" value="{event.endTime}" />
        </f:comment>
        <f:form.hidden name="calendar" value="{calendar.uid}" />
    </div>
    <f:if condition="{possibleEndTimes}">
        <div class="ym-g100 ig-inline fancyInput">
            <div class="selectIeFix">
                <f:form.select errorClass="error" property="endTime" options="{possibleEndTimes}" optionLabelField="name" value="{eventEndDate->f:format.date(format: '%H:%M:%S')}" />
            </div>
        </div>
    </f:if>
    <f:comment><div class="ym-g100 ig-inline fancyInput">
        <div class="selectIeFix">
            <f:form.select errorClass="error" property="eventGroup.repetition" options="{'None': '{f:translate(key: \'tx_igreservations_domain_model_event.repeat.none\')}', 'Weekly': '{f:translate(key: \'tx_igreservations_domain_model_event.repeat.weekly\')}', 'TwoWeeks': '{f:translate(key: \'tx_igreservations_domain_model_event.repeat.twoweeks\')}', 'Monthly': '{f:translate(key: \'tx_igreservations_domain_model_event.repeat.monthly\')}', 'FirstInMonth': '{f:translate(key: \'tx_igreservations_domain_model_event.repeat.firstinmonth\')}', 'LastInMonth': '{f:translate(key: \'tx_igreservations_domain_model_event.repeat.lastinmonth\')}', 'Yearly': '{f:translate(key: \'tx_igreservations_domain_model_event.repeat.yearly\')}'}" optionLabelField="name" value="{eventEndDate->f:format.date(format: '%H:%M:%S')}" />
        </div>
    </div></f:comment>
    <div class="ym-g100 ig-inline">
        <div class="ig-checkbox ig-radio">
            <div class="radioInline">
                <label for="isPublic">
                    <f:form.checkbox id="isPublic" errorClass="error" property="isPublic" value="1" />
                    <span>In öffentlicher Ausgabe</span>
                </label>
            </div>
        </div>
    </div>
    <f:if condition="{bookingTypes}">
        <div class="ym-g100 ig-inline">
            <div class="ig-radio">
                <f:for each="{bookingTypes}" as="bookingType">
                    <div class="radioInline">
                        <label for="bookingTypeRequest-{bookingType.uid}">
                            <f:form.radio id="bookingTypeRequest-{bookingType.uid}" errorClass="error" property="bookingType" value="{bookingType}" />
                            <span>{bookingType.name}</span>
                        </label>
                    </div>
                </f:for>
            </div>
        </div>
    </f:if>
    <f:if condition="{event.calendarGroup} && {event.calendarGroups.calendars->f:count()} > 0 && {calendars}">
        <div class="ym-g100 ig-inline">
            <div class="ig-radio ig-check ig-checkbox">
                <div class="radioInline">
                    <label>Andere Räume</label>
                </div>
                <f:for each="{calendars}" as="cal">
                    <f:if condition="{cal.uid} != {event.calendar.uid}">
                        <div class="radioInline">
                            <label for="calendar-{cal.uid}">
                                <f:form.checkbox id="calendar-{cal.uid}" errorClass="error" property="event.calendarGroup.calendars" multiple="1" value="{cal.uid}" />
                                <span>{cal.name}</span>
                            </label>
                        </div>
                    </f:if>
                </f:for>
            </div>
        </div>
    </f:if>
    <div class="ym-g100 ig-inline fancyInput">
        <label for="locationDescription">
            <f:translate key="tx_igreservations_domain_model_event.location_description" />
        </label>
        <f:form.textfield id="locationDescription" class="fancyElement" errorClass="error" property="locationDescription" />
    </div>
    <f:if condition="{statusses}">
        <div class="ym-g100 ig-inline fancyInput">
            <div class="selectIeFix">
                <f:form.select errorClass="error" property="status" options="{statusses}" optionLabelField="name" prependOptionLabel="{f:translate(key: 'tx_igreservations_domain_model_event.status')}" prependOptionValue="" />
            </div>
        </div>
    </f:if>
    <f:if condition="{categories}">
        <div class="ym-g100 ig-inline fancyInput">
            <div class="selectIeFix">
                <f:form.select errorClass="error" property="category" options="{categories}" optionLabelField="name" prependOptionLabel="{f:translate(key: 'tx_igreservations_domain_model_event.category')}" prependOptionValue="" />
            </div>
        </div>
    </f:if>
    <f:if condition="{calendar.calendarType.partial} == 'FullCalendar'">
        <div class="ym-g100 ig-inline fancyInput">
            <label for="name">
                <f:translate key="tx_igreservations_domain_model_event.purpose" />
            </label>
            <f:form.textfield id="name" class="fancyElement" errorClass="error" property="name" required="true" />
        </div>
        <div class="ym-g100 ig-inline">
            <label for="purpose">
                <f:translate key="tx_igreservations_domain_model_event.description" />
            </label>
            <dp:form.html property="description" config="small" />
        </div>
    </f:if>
    <div class="ym-g100 ig-inline fancyInput amountInput">
        <label for="numParticipants">
            <f:translate key="tx_igreservations_domain_model_event.num_participants" />
        </label>
        <f:if condition="{settings.maxParticipants} > 0">
            <f:then>
                <dp:form.spinner id="numParticipants" class="fancyElement" errorClass="error" property="numParticipants" min="{settings.minParticipants}" max="{settings.maxParticipants}" />
            </f:then>
            <f:else>
                <dp:form.spinner id="numParticipants" class="fancyElement" errorClass="error" property="numParticipants" />
            </f:else>
        </f:if>
    </div>
    <div class="ym-g100 ig-inline fancyInput">
        <label for="notes">
            <f:translate key="tx_igreservations_domain_model_event.notes" />
        </label>
        <f:form.textarea id="notes" class="fancyElement" errorClass="error" property="notes" />
    </div>
    <f:if condition="{event.eventGroup} && {event.eventGroup.repetition} != 'None'">
        <div class="ym-g100 ig-inline fancyInput">
            <div class="selectIeFix">
                <f:form.select errorClass="error" name="applyTo" options="{'this': 'Nur dieses Event bearbeiten', 'after': 'Alle Wiederholungen nach diesem Datum bearbeiten', 'all': 'Alle Wiederholungen dieser Serie bearbeiten'}" value="{repetition}" />
            </div>
        </div>
    </f:if>
</div>

</html>
