<div class="modal modal-slide-add modal-slide">
    <h2>
        {{ l.slideshow_slide_form_add_title }}
    </h2>

    <form action="/slideshow/slide/add" method="POST" enctype="multipart/form-data">

        <h3>
            {{ l.slideshow_slide_form_section_content }}
        </h3>

        {% if current_playlist %}
            <input name="playlist" type="hidden" id="slide-add-playlist" value="{{ current_playlist.id }}">
        {% endif %}

        <div class="form-group">
            <label for="slide-add-name">{{ l.slideshow_slide_form_label_name }}</label>
            <div class="widget">
                <input name="name" type="text" id="slide-add-name" required="required" />
            </div>
        </div>
        <div class="form-group">
            <label for="slide-add-type">{{ l.slideshow_slide_form_label_type }}</label>
            <div class="widget">
                <select name="type" id="slide-add-type">
                    {% for type in enum_slide_type %}
                        {% set input_type = enum_slide_type.get_input(type) %}
                        <option value="{{ type.value }}" data-input="{{ input_type.value }}">
                            {{ t(type) }}
                        </option>
                    {% endfor %}
                </select>
            </div>
        </div>

        <div class="form-group object-input">
            <label for="slide-add-duration">{{ l.slideshow_slide_form_label_object }}</label>
            <div class="widget">
                <input type="text" name="object" id="slide-add-object-input-text" class="slide-add-object-input" />
                <input type="file" name="object" id="slide-add-object-input-upload" class="slide-add-object-input hidden" disabled="disabled" />
            </div>
        </div>

        <h3>
            {{ l.slideshow_slide_form_section_scheduling }}
        </h3>

         <div class="form-group slide-schedule-group">
            <label for="slide-add-cron-schedule">{{ l.slideshow_slide_form_label_cron_scheduled }}</label>
            <div class="widget">
                <select id="slide-add-cron-schedule-trigger" class="trigger">
                    <option value="loop">{{ l.slideshow_slide_form_label_cron_scheduled_loop }}</option>
                    <option value="datetime">{{ l.slideshow_slide_form_label_cron_scheduled_datetime }}</option>
                    <option value="cron">{{ l.slideshow_slide_form_label_cron_scheduled_cron }}</option>
                </select>
                <input type="text" id="slide-add-cron-schedule-datetimepicker" class="datetimepicker" value="" placeholder="{{ l.slideshow_slide_form_label_cron_scheduled_datetime_placeholder }}" />
                <input type="text" name="cron_schedule" id="slide-add-cron-schedule" class="target hidden" placeholder="{{ l.slideshow_slide_form_widget_cron_scheduled_placeholder }}" />
            </div>
        </div>

        <div class="form-group slide-schedule-end-group">
            <label for="slide-add-cron-schedule-end">{{ l.slideshow_slide_form_label_cron_scheduled_end }}</label>
            <div class="widget">
                <select id="slide-add-cron-schedule-end-trigger" class="trigger">
                    <option value="duration">{{ l.slideshow_slide_form_label_cron_scheduled_duration }}</option>
                    <option value="datetime">{{ l.slideshow_slide_form_label_cron_scheduled_datetime }}</option>
                    <option value="cron">{{ l.slideshow_slide_form_label_cron_scheduled_cron }}</option>
                </select>
                <input type="text" id="slide-add-cron-schedule-end-datetimepicker" class="datetimepicker" value="" placeholder="{{ l.slideshow_slide_form_label_cron_scheduled_datetime_placeholder }}" />
                <input type="text" name="cron_schedule_end" id="slide-add-cron-schedule-end" class="target hidden" placeholder="{{ l.slideshow_slide_form_widget_cron_scheduled_placeholder }}" />
            </div>
        </div>

        <div class="form-group slide-duration-group">
            <label for="slide-add-duration">{{ l.slideshow_slide_form_label_duration }}</label>
            <div class="widget">
                <input type="number" name="duration" id="slide-add-duration" required="required" />
                <span>{{ l.slideshow_slide_form_label_duration_unit }}</span>
            </div>
        </div>

        <div class="actions">
            <button type="button" class="btn-normal modal-close">
                {{ l.slideshow_slide_form_button_cancel }}
            </button>
            <button type="submit" class="green">
                <i class="fa fa-plus icon-left"></i> {{ l.slideshow_slide_form_add_submit }}
            </button>
        </div>
    </form>
</div>