-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcall.html
164 lines (130 loc) · 5.59 KB
/
call.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
{% extends "./wrapper.html" %}{% load actionkit_tags %}
{% block content %}
<div class="ak-grid-row">
<div class="ak-grid-col ak-grid-col-12-of-12">
<h2>{{ page.title }}</h2>
</div>
</div>
<form class="ak-form ak-styled-fields" name="act" method="POST" action="/act/" accept-charset="utf-8">
<input type="hidden" name="page" value="{{ page.name }}">
<div class="ak-grid-row">
<div>
<div class="ak-grid-col ak-grid-col-8-of-12">
<div id="call-story" class="ak-text-expander">
{% include_tmpl form.introduction_text %}
</div>
<a href="#" class="ak-read-more ak-mobile">Read more</a>
</div>
<div class="ak-grid-col ak-grid-col-4-of-12">
{% if page.custom_fields.featured_image %}
<img class="ak-featured-img" src="{{page.custom_fields.featured_image}}">
{% endif %}
{% include "./progress_meter.html" %}
<div id="call-form" class="ak-styled-fields {{templateset.custom_fields.field_labels_class|default:"ak-labels-overlaid"}} {{templateset.custom_fields.field_errors_class|default:"ak-errs-below"}}">
<div id="ak-need-contact-info"></div>
<script type="text/ak-template" for="ak-need-contact-info">
[% if (incomplete) { %]
<div class="ak-instructions ak-faded-text">
{% filter ak_text:"call_needs_contact_info" %}
Fill out the form below so we can find the number for you to call.
{% endfilter %}
</div>
[% } %]
</script>
{% include "./user_form_wrapper.html" %}
</div>
</div>
</div>
<div class="ak-steps-area">
<div class="ak-grid-col ak-grid-col-4-of-12">
<div id="what_to_say"></div>
<script type="text/ak-template" for="what_to_say">
[% if (!incomplete) { %]
<h3>
<label class="ak-step-label">
<div class="ak-step-number">1</div>
Review Script
</label>
<span class="ak-arrow-holder"><span class="ak-arrow"></span></span>
</h3>
<div class="ak-field-box ak-field-box-borderless">{% include_tmpl form.script_text %}</div>
[% }
%]
<style>
[% if (incomplete) { %]
#what_to_say { display: none; }
[% } else { %]
.ak-steps-area { clear: both; }
[% } %]
</style>
</script>
</div>
<div class="ak-grid-col ak-grid-col-4-of-12">
<div id="who_called"></div>
<script type="text/ak-template" for="who_called">
[% if (!incomplete) { %]
<h3>
<label class="ak-step-label">
<div class="ak-step-number">2</div>
Make the Call
</label>
<span class="ak-arrow-holder"><span class="ak-arrow"></span></span>
</h3>
<div class="ak-margin-top-1">Who did you call?</div>
[% } %]
</script>
<div id="target_checkboxes" class="ak-margin-bottom-1"></div>
</div>
<div class="ak-grid-col ak-grid-col-4-of-12">
<div id="ak-survey_question"></div>
{% if form.survey_question_text %}
<script type="text/ak-template" for="ak-survey_question">
[% if (!incomplete) { %]
<h3 id="ak-report-call">
<label class="ak-step-label">
<div class="ak-step-number">3</div>
Report the Call
</label>
<span class="ak-arrow-holder"><span class="ak-arrow"></span></span>
</h3>
<div class="ak-labels-overlaid ak-margin-top-1">
<label for="id_action_survey">{% include_tmpl form.survey_question_text %}</label>
<textarea id="id_action_survey" name="action_survey" class="ak-large-message"></textarea>
</div>
[% } %]
</script>
{% endif %}
</div>
</div>
<div class="ak-grid-col ak-grid-col-4-of-12 ak-pull-right">
<button type="submit" class="ak-submit-button">Submit</button>
</div>
</div>
</form>
{% endblock %}
{% block script_additions %}
<script type="text/javascript">
$(window).load(function() {
$('#target_checkboxes').appendTo('div#who_called');
var $window = $(window);
function call_page_steps_mobile() {
var windowSize = $window.width();
if (windowSize < 480) {
$('.ak-steps-area h3').addClass('clickable');
} else {
$('.ak-steps-area h3').removeClass('clickable');
$('.ak-steps-area h3').each( function () {
$(this).siblings('div').show();
});
}
}
$('.ak-steps-area').on('click', 'h3.clickable', function(e) {
e.stopPropagation();
$(this).toggleClass('active');
$(this).siblings('div').stop().slideToggle('fast');
});
$(window).on('resize', call_page_steps_mobile);
call_page_steps_mobile();
});
</script>
{% endblock %}