-
Notifications
You must be signed in to change notification settings - Fork 8
/
whipcount.html
178 lines (152 loc) · 7.42 KB
/
whipcount.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
{% extends "./wrapper.html" %}
{% load actionkit_tags %}
{% block content %}
{% load_remember_me %}
<form class="ak-form whipcount" name="act" method="POST" action="/act/" accept-charset="utf-8">
<input type="hidden" name="page" value="{{ page.name }}">
<div class="ak-grid-row">
<div class="ak-grid-col ak-grid-col-12-of-12">
<h2>{{ page.title }}</h2>
</div>
</div>
{% if action %}
<div class="ak-grid-row">
<div class="ak-grid-col ak-grid-col-12-of-12">
<h3 class="thanks">Thanks for making a whipcount call!</h3>
<p>We've noted that {% for contact in action.called.all %}{{ contact.target.title_last }} is {{ contact.response }}{% endfor %}!</p>
<div>
{% include_tmpl form.thank_you_text %}
</div>
</div>
</div>
{% endif %}
<div class="ak-grid-row ak-grid-row-inverted">
{% if page.custom_fields.featured_image or page.goal %}
<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>
{% endif %}
<div class="ak-grid-col {% if page.custom_fields.featured_image or page.goal %}ak-grid-col-8-of-12{% else %}ak-grid-col-12-of-12{% endif %} ak-styled-description">
<div class="ak-text-expander">
{% autoescape off %}
{% include_tmpl form.introduction_text %}
{% endautoescape %}
</div>
<a href="#" class="ak-read-more ak-mobile" data-lines="10">Read more</a>
</div>
</div>
{% if not target %}
<div class="ak-grid-row">
<div class="ak-grid-col ak-grid-col-12-of-12">
{% include "./whipcount_results.html" %}
</div>
</div>
{% else %}
<div class="ak-grid-row ak-steps-area">
<ul id="ak-errors"></ul>
<div id="who_to_call" class="ak-grid-col ak-grid-col-4-of-12">
<div>
<h3>
<label class="ak-step-label" for="{{ target.id }}">
<div class="ak-step-number">1</div>
Review Script
</label>
<span class="ak-arrow-holder"><span class="ak-arrow"></span></span>
</h3>
<div id="what_to_say" class="ak-field-box ak-field-box-borderless"></div>
<script type="text/ak-template" for="what_to_say">
{% include_tmpl form.script_text %}
</script>
</div>
</div>
<div id="response" class="ak-styled-fields ak-grid-col ak-grid-col-4-of-12">
<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-whipcount-callbox">
<div class="ak-whipcount-boxhead">
<div class="ak-target-name">{{ target.title_full }}:</div>
<div class="ak-target-phone">{{ target.phone }}</div>
</div>
<div class="ak-whipcount-boxbody">
<label for="response-{{target.id}}">What is {{ target.title_full }}'s stance on this issue?</label>
<ul class="ak-errs-below ak-err-below">
<li>
<label for="uncommitted-{{ target.id }}"><input type="radio" name="response-{{ target.id }}" value="uncommitted" id="uncommitted-{{ target.id }}"> Uncommitted/Did not answer</label>
</li>
<li>
<label for="supportive-{{ target.id }}"><input type="radio" name="response-{{ target.id }}" value="supportive" id="supportive-{{ target.id }}"> Supportive of our position</label>
</li>
<li>
<label for="opposed-{{ target.id }}"><input type="radio" name="response-{{ target.id }}" value="opposed" id="opposed-{{ target.id }}"> Opposed to our position</label>
</li>
<li>
<label for="message-{{ target.id }}"><input type="radio" name="response-{{ target.id }}" value="message" id="message-{{ target.id }}"> Left a message</label>
</li>
</ul>
<input type="hidden" name="required" value="response-{{ target.id }}">
<input type="hidden" name="error_response-{{target.id}}:missing" value="Please let us know what {{ target.title_last }} responded!">
</div>
</div>
</div>
<div class="ak-grid-col ak-grid-col-4-of-12">
<h3>
<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-styled-fields {{templateset.custom_fields.field_labels_class|default:'ak-labels-overlaid'}} {{templateset.custom_fields.field_errors_class|default:'ak-errs-below'}}" id="ak-report-call">
{% include "./user_form_wrapper.html" %}
<div id="ak-survey_question"></div>
{% if form.survey_question_text %}
<script type="text/ak-template" for="ak-survey_question">
{% autoescape off %}
<label for="id_action_survey">{% filter striptags %}{% include_tmpl form.survey_question_text %}{% endfilter %}</label>
{% endautoescape %}
<textarea id="id_action_survey" name="action_survey" style="height: 100px"></textarea></p>
</script>
{% endif %}
</div>
<div style="clear: both;">
<button type="submit" class="ak-submit-button">Submit</button>
</div>
</div>
<input type="hidden" name="status" value="whipcount">
</div>
{% endif %}
</form>
{% endblock %}
{% block script_additions %}
<script type="text/javascript">
$(window).load(function() {
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 %}