<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="event.startDate" value="{eventStartDate}" />
            <dp:form.hiddenDate property="event.endDate" value="{eventEndDate}" />
            <f:form.hidden property="event.startTime" value="{eventStartDate->f:format.date(format: '%H:%M:%S')}" />
		  </f:then>
		  <f:else>
                    <f:form.hidden property="event.timeslot" value="{timeslot.uid}" />
		  </f:else>
		</f:if>
        <f:form.hidden property="event.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="event.startDate" value="{event.startDate->f:format.date(format: 'Y-m-d')}" />
            <f:form.hidden property="event.endDate" value="{event.endDate->f:format.date(format: 'Y-m-d')}" />
            <f:form.hidden property="event.startTime" value="{event.startTime}" />
            <f:form.hidden property="event.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="event.endTime" options="{possibleEndTimes}" optionLabelField="name" value="{eventEndDate->f:format.date(format: '%H:%M:%S')}" />
            </div>
        </div>
    </f:if>
    <f:if condition="{canRepeat} && !{edit}">
        <div class="ym-g100 ig-inline fancyInput repetition-select">
            <div class="selectIeFix">
                <f:form.select errorClass="error" property="event.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:if>
    <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="event.isPublic" value="{event.isPublic}" />
                    <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="event.bookingType" value="{bookingType}" />
                            <span>{bookingType.name}</span>
                        </label>
                    </div>
                </f:for>
            </div>
        </div>
    </f:if>
    <f:if condition="{statusses}">
        <div class="ym-g100 ig-inline fancyInput">
            <div class="selectIeFix">
                <f:form.select errorClass="error" property="event.status" options="{statusses}" optionLabelField="name" prependOptionLabel="{f:translate(key: 'tx_igreservations_domain_model_event.status')}" prependOptionValue="" value="6" />
            </div>
        </div>
    </f:if>
    <f:if condition="{categories}">
        <div class="ym-g100 ig-inline fancyInput">
            <div class="selectIeFix">
                <f:form.select errorClass="error" property="event.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="purpose">
                <f:translate key="tx_igreservations_domain_model_event.purpose" />
            </label>
            <f:form.textfield id="name" class="fancyElement address-field" errorClass="error" property="event.name" />
        </div>
        <div class="ym-g100 ig-inline">
            <label for="purpose">
                <f:translate key="tx_igreservations_domain_model_event.description" />
            </label>
            <dp:form.html id="dp-field-ckeditor-event-description" property="event.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="event.numParticipants" min="{settings.minParticipants}" max="{settings.maxParticipants}" />
            </f:then>
            <f:else>
                <dp:form.spinner id="numParticipants" class="fancyElement" errorClass="error" property="event.numParticipants" />
            </f:else>
        </f:if>
    </div>
    <div class="ym-g100 ig-inline fancyInput">
        <div class="selectIeFix">
            <f:form.select class="address-field" errorClass="error" property="salutation"
                options="{1: '{f:translate(key: \'tx_igreservations_domain_model_address.salutation.1\')}', 2: '{f:translate(key: \'tx_igreservations_domain_model_address.salutation.2\')}'}"
                prependOptionLabel="{f:translate(key: 'tx_igreservations_domain_model_address.salutation')}" prependOptionValue="" />
        </div>
    </div>
    <div class="ym-g100 ig-inline fancyInput">
        <label for="firstName">
            <f:translate key="tx_igreservations_domain_model_address.first_name" />
        </label>
        <f:form.textfield id="firstName" class="fancyElement address-field" errorClass="error" property="firstName" />
    </div>
    <div class="ym-g100 ig-inline fancyInput">
        <label for="lastName">
            <f:translate key="tx_igreservations_domain_model_address.last_name" />
        </label>
        <f:form.textfield id="lastName" class="fancyElement address-field" errorClass="error" property="lastName" />
    </div>
    <div class="ym-g100 ig-inline fancyInput">
        <label for="company">
            <f:translate key="tx_igreservations_domain_model_address.company" />
        </label>
        <f:form.textfield id="company" class="fancyElement address-field" errorClass="error" property="company" />
    </div>
    <div class="ym-g100 ig-inline fancyInput">
        <label for="address">
            <f:translate key="tx_igreservations_domain_model_address.address" />
        </label>
        <f:form.textfield id="address" class="fancyElement address-field" errorClass="error" property="address" />
    </div>
    <div class="ym-g100 ig-inline fancyInput">
        <label for="zip">
            <f:translate key="tx_igreservations_domain_model_address.zip" />
        </label>
        <f:form.textfield id="zip" class="fancyElement address-field" errorClass="error" property="zip" />
    </div>
    <div class="ym-g100 ig-inline fancyInput">
        <label for="city">
            <f:translate key="tx_igreservations_domain_model_address.city" />
        </label>
        <f:form.textfield id="city" class="fancyElement address-field" errorClass="error" property="city" />
    </div>
    <div class="ym-g100 ig-inline fancyInput">
        <label for="email">
            <f:translate key="tx_igreservations_domain_model_address.email" />
        </label>
        <f:form.textfield id="email" class="fancyElement address-field" errorClass="error" property="email" />
    </div>
    <div class="ym-g100 ig-inline fancyInput">
        <label for="phone">
            <f:translate key="tx_igreservations_domain_model_address.phone" />
        </label>
        <f:form.textfield id="phone" class="fancyElement address-field" errorClass="error" property="phone" />
    </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="event.notes" />
    </div>
    <f:if condition="{calendars}">
        <div class="ym-g100 ig-inline rooms-checkboxes">
            <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="event.locationDescription" />
    </div>
</div>

</html>
