<?xml version="1.0"?>
<t t-name="website_mass_mailing.s_newsletter_block_form_template">
    <section class="s_website_form" data-vcss="001" data-snippet="s_website_form" data-name="Form">
        <div class="container">
            <form id="newsletter_form" action="/website/form/" method="post" enctype="multipart/form-data" class="o_mark_required" data-mark="*" data-model_name="mailing.contact" data-success-mode="message" hide-change-model="true">
                <div class="s_website_form_rows row s_col_no_bgcolor">
                    <div class="mb-0 py-2 col-12 s_website_form_field s_website_form_model_required" data-type="char" data-name="Field">
                        <div class="row s_col_no_resize s_col_no_bgcolor">
                            <label class="col-form-label col-sm-auto s_website_form_label" style="width: 250px" for="mailing_sub1">
                                <span class="s_website_form_label_content">Your Name</span>
                                <span class="s_website_form_mark"> *</span>
                            </label>
                            <div class="col-sm">
                                <input id="mailing_sub1" type="text" class="form-control s_website_form_input" name="name" required="1"/>
                            </div>
                        </div>
                    </div>
                    <div class="mb-0 py-2 col-12 s_website_form_field s_website_form_model_required" data-type="email" data-name="Field">
                        <div class="row s_col_no_resize s_col_no_bgcolor">
                            <label class="col-form-label col-sm-auto s_website_form_label" style="width: 250px" for="mailing_sub2">
                                <span class="s_website_form_label_content">Your Email</span>
                                <span class="s_website_form_mark"> *</span>
                            </label>
                            <div class="col-sm">
                                <input id="mailing_sub2" type="email" class="form-control s_website_form_input" name="email"/>
                            </div>
                        </div>
                    </div>
                    <div class="mb-0 py-2 col-12 s_website_form_field s_website_form_model_required" data-type="many2many" data-name="Field">
                        <div class="row s_col_no_resize s_col_no_bgcolor">
                            <label class="col-sm-auto s_website_form_label" style="width: 250px" for="mailing_list_">
                                <span class="s_website_form_label_content">Subscribe to</span>
                                <span class="s_website_form_mark"> *</span>
                            </label>
                            <div class="col-sm">
                                <div class="row s_col_no_resize s_col_no_bgcolor s_website_form_multiple" data-name="list_ids" data-display="horizontal">
                                    <t t-foreach="request.env['mailing.list'].search([('is_public', '=', True)])" t-as="record">
                                        <div class="checkbox col-12 col-lg-4 col-md-6">
                                            <div class="form-check">
                                                <input type="checkbox" class="s_website_form_input form-check-input" name="list_ids" t-attf-id="mailing_list_#{record.id}" t-att-value="record.id" required="1"/>
                                                <label class="form-check-label s_website_form_check_label" t-attf-for="mailing_list_#{record.id}">
                                                    <t t-esc="record.name"/>
                                                </label>
                                            </div>
                                        </div>
                                    </t>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="mb-0 py-2 col-12 s_website_form_field s_website_form_custom s_website_form_required" data-type="boolean" data-name="Field">
                        <div class="row s_col_no_resize s_col_no_bgcolor">
                            <label class="col-sm-auto s_website_form_label" style="width: 250px;" for="mailing_sub3">
                                <span class="s_website_form_label_content">I agree to receive updates</span>
                                <span class="s_website_form_mark"> *</span>
                            </label>
                            <div class="col-sm">
                                <div class="form-check">
                                    <input type="checkbox" value="Yes" class="s_website_form_input" name="I want to be kept updated" id="mailing_sub3" required="1"/>
                                </div>
                                <div class="s_website_form_field_description small form-text text-muted">
                                    We send one weekly newsletter per list and always try to keep it interesting. You can unsubscribe at any time.
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="mb-0 py-2 col-12 s_website_form_submit" data-name="Submit Button">
                        <div style="width: 250px;" class="s_website_form_label"/>
                        <a href="#" role="button" class="btn btn-primary btn-lg s_website_form_send">Subscribe</a>
                        <span id="s_website_form_result"/>
                    </div>
                </div>
            </form>
            <div class="s_website_form_end_message d-none">
                <div class="oe_structure">
                    <section class="s_text_block pt64 pb64 o_colored_level o_cc o_cc2" data-snippet="s_text_block">
                        <div class="container">
                            <h2 class="text-center"><span class="fa fa-check-circle"/>
                                Thank you for subscribing !
                            </h2>
                            <p class="text-center">
                                You will now be informed about the latest news.<br/>
                            </p>
                        </div>
                    </section>
                </div>
            </div>
        </div>
    </section>
</t>

