-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcall.html
More file actions
198 lines (158 loc) · 7.28 KB
/
call.html
File metadata and controls
198 lines (158 loc) · 7.28 KB
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
{% 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>
{% if page.custom_fields.callpower_campaign_id %}
<script type="text/javascript">
window.CallPowerOptions = {
form: "form.ak-form.incomplete",
phoneField: "#id_phone",
locationField: "#id_zip",
scriptDisplay: "overlay",
submitDelay: 500,
customJS: "$('.overlay').on('hide', function() { actionkit.form.submit(); });",
overlayCloseText: 'After your call, click here to log your call',
};
</script>
<script type="text/javascript" src="https://demandprogress.callpower.org/api/campaign/{{page.custom_fields.callpower_campaign_id}}/embed.js"></script>
{% endif %}
<form class="ak-form ak-styled-fields {%if not action%}incomplete{%endif%}" name="act" method="POST" action="/act/" accept-charset="utf-8">
{% if page.custom_fields.callpower_campaign_id and page.recognize != "never" and akid and user.phone %}
<!-- hidden fields necessary for CallPower to work for recognized users -->
<input id="id_name" type="hidden" name="name" value="{{user.name}}">
<input id="id_email" type="hidden" name="email" value="{{user.email}}">
<input id="id_phone" type="hidden" name="phone" value="{{user.phone}}">
<input id="id_address1" type="hidden" name="address1" value="{{user.address1}}">
<input id="id_city" type="hidden" name="city" value="{{user.city}}">
<input id="id_state" type="hidden" name="state" value="{{user.state}}">
<input id="id_zip" type="hidden" name="zipcode" value="{{user.zip}}">
{% endif %}
<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" >
{% autoescape off %}
{% include_tmpl form.introduction_text %}
{% endautoescape %}
</div>
</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-field-box 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">
<h3>Make a call</h3>
[% 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">
{% autoescape off %}
<label for="id_action_survey">{% include_tmpl form.survey_question_text %}</label>
{% endautoescape %}
<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 %}