{% block form_content %}
    <h2>{{ text.subscribe.title }}</h2>
    <span id="news_fill_fields">{{ text.subscribe.fields }}</span>
    <form id="news_subscribe_form" action="#" method="post">
        <input type="hidden" id="{{ REQUEST.id }}">
        <label>{{ text.contact.name }} *</label>
        <input type="text" id="subscribe_name" name="subscribe[name]" class="validate[required,custom[name]]" placeholder="">
        <label>{{ text.contact.phone }} </label>
        <input type="text" id="subscribe_phone" name="subscribe[phone]" class="validate[custom[phone_world]]" placeholder="">
        <label>{{ text.misc.email }} *</label>
        <input type="text" id="subscribe_email" name="subscribe[email]" class="validate[required,custom[email]]" placeholder="">
        <label>{{ booking_boat_data['date_label'] }} *</label>
        <input type="text" id="subscribe_date" name="subscribe[date]" class="validate[required]" placeholder="">
        <label>{{ booking_boat_data['no_guests_label'] }} *</label>
        <select id="subscribe_no_guests" name="subscribe[no_guests]" class="validate[required]">
            <option value="" selected="selected" disabled="disabled">&lt;{{ booking_boat_data['choose_label'] }}&gt;</option>
            {% for i in 1..10 %}
                <option value="{{ i }}">{{ i }}</option>
            {% endfor %}
        </select>
        <label>{{ booking_boat_data['prefered_charter_label'] }} *</label>
        <select id="subscribe_prefered" name="subscribe[prefered]" class="validate[required]">
            <option value="" selected="selected" disabled="disabled">&lt;{{ booking_boat_data['choose_charter_label'] }}&gt;</option>
            {% for boat in booking_boat_data['boat_options'] %}
                <option value="{{ boat['id_news'] }}" {% if boat['id_news'] == id %}selected="selected"{% endif %}>{{ boat['title'] }}</option>
            {% endfor %}
        </select>
        <label>{{ text.contact.obs }} *</label>
        <textarea id="subscribe_obs" name="subscribe[obs]" class="validate[required,custom[text]]" placeholder=""></textarea>

        {% if captcha_show %}
            <label for="name">{{ text.contact.captcha }}: <span id="captcha_question_sub">{{ captcha_question }}</span> *</label>
            <input type="text" id="captcha" name="subscribe[captcha] " class="validate[required] form-control" />
        {% endif %}
            
        {% block _ext_data_form_content_consent %}{% endblock %}
            
        <input type="submit" id="subscribe_send" name="subscribe[send]" value="{{ text.contact.send }}" class="small-button">
        <span id="news_subscribe_ob_fields">* {{ text.subscribe.ob_fields }}</span>
    </form>
{% endblock %}
{% block javascript %}
    <script>
        $("#subscribe_date").datepicker({
                dateFormat:"{{ text.js.date }}",
                beforeShow: function(){
                    setTimeout(function(){
                        $('.ui-datepicker').css('z-index', 99999999999999);
                    }, 100);
                }
            });
    </script>

{% endblock %}