<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>
    <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">
        <f:form.textfield id="name" class="fancyElement address-field form-control" placeholder=" " errorClass="error" property="event.name" />
        <label for="name" class="control-label">
            <f:translate key="tx_igreservations_domain_model_event.purpose" />
        </label>
    </div>
    <div class="ym-g100 ig-inline">
        <dp:form.html id="dp-field-ckeditor-event-description" property="event.description" config="small" class="form-control" placeholder=" " />
        <label for="dp-field-ckeditor-event-description" class="control-label">
            <f:translate key="tx_igreservations_domain_model_event.description" />
        </label>
    </div>
</f:if>
<div class="ym-g100 ig-inline fancyInput amountInput">
    <f:if condition="{settings.maxParticipants} > 0">
        <f:then>
            <dp:form.spinner id="numParticipants" class="fancyElement form-control" placeholder=" " errorClass="error" property="event.numParticipants" min="{settings.minParticipants}" max="{settings.maxParticipants}" />
        </f:then>
        <f:else>
            <dp:form.spinner id="numParticipants" class="fancyElement form-control" placeholder=" " errorClass="error" property="event.numParticipants" />
        </f:else>
    </f:if>
    <label for="numParticipants" class="control-label">
        <f:translate key="tx_igreservations_domain_model_event.num_participants" />
    </label>
</div>
<div class="ym-g100 ig-inline fancyInput">
    <div class="selectIeFix">
        <f:form.select class="address-field form-control" 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">
    <f:form.textfield id="lastName" class="fancyElement address-field form-control" placeholder=" " errorClass="error" property="lastName" />
    <label for="lastName" class="control-label">
        <f:translate key="tx_igreservations_domain_model_address.last_name" />
    </label>
</div>
<div class="ym-g100 ig-inline fancyInput">
    <f:form.textfield id="company" class="fancyElement address-field form-control" placeholder=" " errorClass="error" property="company" />
    <label for="company" class="control-label">
        <f:translate key="tx_igreservations_domain_model_address.company" />
    </label>
</div>
<div class="ym-g100 ig-inline fancyInput">
    <f:form.textfield id="address" class="fancyElement address-field form-control" placeholder=" " errorClass="error" property="address" />
    <label for="address" class="control-label">
        <f:translate key="tx_igreservations_domain_model_address.address" />
    </label>
</div>
<div class="ym-g100 ig-inline fancyInput">
    <f:form.textfield id="zip" class="fancyElement address-field form-control" placeholder=" " errorClass="error" property="zip" />
    <label for="zip" class="control-label">
        <f:translate key="tx_igreservations_domain_model_address.zip" />
    </label>
</div>
<div class="ym-g100 ig-inline fancyInput">
    <f:form.textfield id="city" class="fancyElement address-field form-control" placeholder=" " errorClass="error" property="city" />
    <label for="city" class="control-label">
        <f:translate key="tx_igreservations_domain_model_address.city" />
    </label>
</div>
<div class="ym-g100 ig-inline fancyInput">
    <f:form.textfield id="email" class="fancyElement address-field form-control" placeholder=" " errorClass="error" property="email" />
    <label for="email" class="control-label">
        <f:translate key="tx_igreservations_domain_model_address.email" />
    </label>
</div>
<div class="ym-g100 ig-inline fancyInput">
    <f:form.textfield id="phone" class="fancyElement address-field form-control" placeholder=" " errorClass="error" property="phone" />
    <label for="phone" class="control-label">
        <f:translate key="tx_igreservations_domain_model_address.phone" />
    </label>
</div>
<div class="ym-g100 ig-inline fancyInput">
    <f:form.textarea id="notes" class="fancyElement form-control" placeholder=" " errorClass="error" property="event.notes" />
    <label for="notes" class="control-label">
        <f:translate key="tx_igreservations_domain_model_event.notes" />
    </label>
</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>

</html>
