-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path_page_volunteer_multi_step.html
executable file
·178 lines (164 loc) · 6.36 KB
/
_page_volunteer_multi_step.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
{% if page.headline.size > 0 %}
<h2 class="headline">{{ page.headline }}</h2>
{% endif %}
<div id="content">
{% if page.volunteer_signup.content.size > 0 %}
<div id="intro" class="intro">{{ page.volunteer_signup.content }}</div>
{% endif %}
<div class="form-wrap">
<div class="form">
<dl class="tabs" data-tab data-options="deep_linking: true">
<dd class="active">
<a href="#panel2-1">Tab 1</a>
</dd>
<dd>
<a href="#panel2-2">Tab 2</a>
</dd>
<dd>
<a href="#panel2-3">Tab 3</a>
</dd>
</dl>
<div class="tabs-content">
<div class="content active" id="panel2-1">
{% if request.sorta_logged_in? %}
{% if request.current_signup.is_volunteer? %}
<h4>
Hi {{ request.current_signup.name_or_email }}, we have you down as a volunteer.
</h4>
<div class="padtop">You can update your info below.</div>
{% else %}
<h4>
Hi {{ request.current_signup.name_or_email }}, can you volunteer?
</h4>
{% endif %}
{% if request.logged_in? == false %}
<div class="padbottommore">
<small>
If you're not {{ request.current_signup.name_or_email }},
<a href="{{ request.current_signup.logout_url }}">click here</a>
.
</small>
</div>
{% endif %}
{% else %}
<h4>Will you volunteer?</h4>
{% endif %}
{% form_for volunteer_signup %}
<div class="form-errors">{% error_messages_for volunteer_signup %}</div>
<div class="padtopmore">
{% for volunteer_type in page.volunteer_signup.volunteer_types %}
<div class="row">
<div class="columns">
<label class="checkbox">
{% check_box_tag 'volunteer_signup[volunteer_type_ids][]', volunteer_type.id, collection:volunteer_signup.volunteer_type_ids, member:volunteer_type.id, class:"checkbox" %}
{{ volunteer_type.name }}
</label>
</div>
</div>
{% endfor %}
</div>
{% hidden_field_tag 'volunteer_signup[volunteer_type_ids][]', '' %}
</div>
<div class="content" id="panel2-2">
{% if request.sorta_logged_in? == false or request.current_signup.has_name? == false %}
<div class="row">
<div class="small-6 medium-6 columns">
<label for="volunteer_signup_first_name">First Name</label>
{% text_field "first_name", class:"text" %}
</div>
<div class="small-6 medium-6 columns">
<label for="volunteer_signup_last_name">Last Name</label>
{% text_field "last_name", class:"text" %}
</div>
</div>
{% endif %}
{% if request.sorta_logged_in? == false %}
<div class="row">
<div class="medium-6 columns">
<label for="volunteer_signup_email">Email</label>
{% email_field "email", class:"text" %}
</div>
{% if site.ask_for_mobiles? %}
<div class="medium-6 columns">
<label for="volunteer_signup_mobile_number">Mobile phone (optional)</label>
{% phone_field "mobile_number", class:"text" %}
</div>
{% endif %}
</div>
<div class="row">
<div class="medium-6 columns">
<label class="checkbox" for="volunteer_signup_email_opt_in">
{% check_box "email_opt_in", class:"checkbox" %} Send me email updates
</label>
</div>
{% if site.ask_for_mobiles? %}
<div class="medium-6 columns">
<label class="checkbox" for="volunteer_signup_mobile_opt_in">
{% check_box "mobile_opt_in", class:"checkbox" %} Send me text messages
</label>
</div>
{% endif %}
</div>
{% endif %}
{% if page.volunteer_signup.is_phone? %}
<div class="row">
<div class="medium-6 columns">
<label for="volunteer_signup_phone_number">Phone</label>
{% phone_field "phone_number", class:"text" %}
</div>
<div class="medium-6 columns">
<label for="volunteer_signup_phone_time">When is a good time to call?</label>
{% text_field "phone_time", class:"text" %}
</div>
</div>
{% endif %}
{% if page.volunteer_signup.is_address? %}
{% if request.sorta_logged_in? == false or request.current_signup.has_full_address? == false %}
<div class="row">
<div class="columns">
<label for="volunteer_signup_submitted_address">Address (Street, City, State, Zip code)</label>
{% text_field "submitted_address", class:"text" %}
</div>
</div>
{% endif %}
{% endif %}
</div>
<div class="content" id="panel2-3">
<div class="row">
<div class="columns">
<label for="volunteer_signup_availability">When are you available? (optional)</label>
{% text_field "availability", class:"text" %}
</div>
</div>
<div class="row">
<div class="columns">
<label for="volunteer_signup_content">Comments, other ideas, etc. (optional)</label>
{% text_area "content", class:"textarea autogrow" %}
</div>
</div>
{% if site.ask_to_publish_to_stream? %}
<div class="row">
<div class="columns">
<label class="checkbox" for="volunteer_signup_is_private">
{% check_box "is_private", class:"checkbox" %} Don't publish this on the website
</label>
</div>
</div>
{% endif %}
{% submit_tag "Save volunteer info", class:"submit-button" %}
<div class="form-submit"></div>
{% endform_for %}
</div>
</div>
</div>
</div>
{% if page.tags_count > 0 %}
<div id="page-tags" class="page-tags">{% include "page_tags" with page %}</div>
{% endif %}
<div class="like-page"> <strong>Share this page:</strong>
{% include "like_page" %}
</div>
{% if page.show_stream? %}
{% include "page_stream" %}
{% endif %}
</div>