<div class="module module-newsletter module-{{ module.id }} {{ module.customClass }}">
    {% if module.params.title is not empty and module.params.title_tag is not empty %}
        <{{ module.params.title_tag|striptags }} class="module-title">
            {{ module.params.title|striptags }}
        </{{ module.params.title_tag|striptags }}>
    {% endif %}

    {{ module.params.intro|escape }}

    <form id="formNewsletter" class="newsletter-form-{{ module.id }}" method="post">
        <div 
            id="recaptchaNewsletter" 
            class="g-recaptcha" 
            data-sitekey="{{ google_recaptcha_public_key }}"
            data-callback="newsletterCallback"
            data-size="invisible"
        ></div>
        <div class="input-group">
            <input id="newsletter-email" name="newsletter_subscription_simple_email" placeholder="{{ 'word.newsletter.placeholder'|trans({}, 'word')  }}" required type="email" class="form-control">
            <div class="input-group-append">
                <button class="btn btn-sm btn-pelorous">{{ 'word.newsletter.send'|trans({}, 'word') }}</button>
            </div>
        </div>
    </form>

    

    {% for msg in app.session.flashbag.get('newsletter_subscription_simple_success') %}
        {% if loop.first %}
            <div class="alert alert-success">
        {% endif %}

        <div class="notice">{{ msg }}</div>

        {% if loop.last %}
            </div>
        {% endif %}
    {% endfor %}

    {% for msg in app.session.flashbag.get('newsletter_subscription_simple_errors') %}
        {% if loop.first %}
            <div class="alert alert-danger">
        {% endif %}

        <div class="notice">{{ msg }}</div>

        {% if loop.last %}
            </div>
        {% endif %}
    {% endfor %}
</div>