{% load static cms_tags sekizai_tags i18n %}
{% spaceless %}
   {% if form %}
        <form id="form{{ instance.id|safe }}{{ form.slug }}"{{ instance.get_attributes }}
              novalidate action="{% url 'dcf_forms:ajaxview' instance.id %}"
              method="post">
            {% csrf_token %}
            {% include 'djangocms_frontend/ajax_form.html' with form=form instance=instance tracking=instance.tracking_code RECAPTCHA_PUBLIC_KEY=RECAPTCHA_PUBLIC_KEY %}
            {% if instance.form_submit_message %}
                {% if instance.form_submit_align == "center" %}
                    <div class="text-center">
                {% endif %}
                <input type="submit" value="{{ instance.form_submit_message|default:_("Submit") }}"
                    class="btn btn-{{ instance.form_submit_context }}{% if instance.form_submit_align == "start" or instance.form_submit_align == "end" %} float-{{ instance.form_submit_align }}{% endif %}"/>
                {% if instance.form_submit_align == "center" %}
                    </div>
                {% endif %}
            {% endif %}
        </form><div class="clearfix"></div>
    {% endif %}
{% endspaceless %}
