You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
3.2 KiB
70 lines
3.2 KiB
{% load cms_tags djangocms_forms_tags i18n sekizai_tags staticfiles %}
|
|
|
|
<div ng-controller="ModalFormCtrl" class="modal-form">
|
|
<script type="text/ng-template" id="modalFormTemplate-{{ instance.id }}.html">
|
|
<div class="modal-body modal-consultation">
|
|
<img src="{% with 'imgs/phone.png' as image_static %}{% static image_static %}{% endwith %}">
|
|
<div class="forms" id="{{ instance.form_id }}">
|
|
{% if instance.title %}
|
|
<h3 class="title">{{ instance.title }}</h3>
|
|
{% endif %}
|
|
{% if instance.description %}
|
|
<div class="description">
|
|
{{ instance.description|safe }}
|
|
</div>
|
|
{% endif %}
|
|
<div class="form-wrapper">
|
|
<form action="{{ form.submission_url }}" method="POST" enctype="multipart/form-data" onsubmit="yaCounter950321.reachGoal('Callback'); return true;">
|
|
<div class="form-errors" style="display:none;"></div>
|
|
{% for field in form.visible_fields %}
|
|
<div class="field-wrapper {{ field|input_class }} {{ field.css_classes }}">
|
|
{% if field.help_text %}
|
|
<div id="help-text-{{ field.auto_id }}" class="help-text">{{ field.help_text|safe }}</div>
|
|
{% endif %}
|
|
<div class="field-errors" style="display:none;"></div>
|
|
{% if field|is_checkbox %}
|
|
{{ field }}
|
|
{% endif %}
|
|
<label for="{{ field.id_for_label }}">
|
|
{{ field.label }}
|
|
</label>
|
|
{% if not field|is_checkbox %}
|
|
<p>{{ field }}</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
{% csrf_token %}
|
|
{% for hidden in form.hidden_fields %}
|
|
{{ hidden }}
|
|
{% endfor %}
|
|
<div class="button-wrapper submit">
|
|
<button class="form-button btn btn-primary" type="submit" value="{{ instance.submit_btn_txt }}">{{ instance.submit_btn_txt }}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="form-success" style="display: none;">
|
|
{% if instance.post_submit_msg %}
|
|
<p>{{ instance.post_submit_msg|safe }}</p>
|
|
{% else %}
|
|
{% blocktrans %}
|
|
<h3>Submission successful</h3>
|
|
<p>Thank You! Your form has been successfully submitted!</p>
|
|
{% endblocktrans %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</form>
|
|
</div>
|
|
</script>
|
|
|
|
<button class="btn btn-consultation" ng-click="open('{{ instance.id }}')" value="">{{ instance.title }}</button>
|
|
|
|
</div>
|
|
|
|
{% addtoblock "js" %}
|
|
<script src="{% static 'js/djangocms_forms/libs/jquery.form.min.js' %}"></script>
|
|
<script src="{% static 'js/djangocms_forms/djangocms_forms.js' %}"></script>
|
|
{% endaddtoblock %}
|
|
|