parent
010fe65783
commit
e699fae593
10 changed files with 159 additions and 6 deletions
@ -0,0 +1,17 @@ |
|||||||
|
{% load cms_tags djangocms_forms_tags i18n sekizai_tags staticfiles %} |
||||||
|
|
||||||
|
<h1 class="l-offset-top">{{ results.plugin.name }}</h1> |
||||||
|
|
||||||
|
{% if request.LANGUAGE_CODE == 'ru' %} |
||||||
|
<ul class="list-unstyled list-inline"> |
||||||
|
<li><a href="{{ current_page.parent.get_absolute_url }}">{{ current_page.parent }}</a></li> |
||||||
|
<li>→</li> |
||||||
|
<li><a href="{{ request.META.HTTP_REFERER }}">{{ results.plugin.name }}</a></li> |
||||||
|
<li>→</li> |
||||||
|
<li>Консультация</li> |
||||||
|
</ul> |
||||||
|
|
||||||
|
<h2 class="m-offset-top">Ваше обращение <strong>№ {{ results.id }}</strong> зарегистрировано</h2> |
||||||
|
{% else %} |
||||||
|
<h2>Your message is registered under <strong>№ {{ results.id }}</strong></h2> |
||||||
|
{% endif %} |
||||||
@ -0,0 +1,85 @@ |
|||||||
|
{% load cms_tags djangocms_forms_tags i18n sekizai_tags staticfiles %} |
||||||
|
|
||||||
|
<div class="order order-form" ng-controller="ModalFormCtrl" class="modal-form"> |
||||||
|
<script type="text/ng-template" id="modalFormTemplate-{{ instance.id }}.html"> |
||||||
|
<div class="modal-body modal-form"> |
||||||
|
<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('Order'); 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 xs-offset-bottom" ng-click="open('{{ instance.id }}');" onclick="yaCounter950321.reachGoal('OrderOpen'); return true;" value="">{{ instance.title }}</button> |
||||||
|
<p>Вы можете <em>обратить к нам с вопросом</em> или <em>заказать услугу</em> «{{ instance.name }}»</p> |
||||||
|
</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> |
||||||
|
<script type="text/javascript"> |
||||||
|
$(function() { |
||||||
|
if(typeof consultation_link == "undefined") { |
||||||
|
$( "[href^='#order'" ).click(function(e) { |
||||||
|
event.preventDefault(); |
||||||
|
|
||||||
|
angular.element($('.order-form')[0]).scope().open({{ instance.id }}); |
||||||
|
yaCounter950321.reachGoal('OrderOpen'); |
||||||
|
}); |
||||||
|
|
||||||
|
consultation_link = true; |
||||||
|
} |
||||||
|
}); |
||||||
|
</script> |
||||||
|
|
||||||
|
{% endaddtoblock %} |
||||||
Loading…
Reference in new issue