-
Notifications
You must be signed in to change notification settings - Fork 0
/
_homepage_excerpt_signup.html
106 lines (85 loc) · 4.61 KB
/
_homepage_excerpt_signup.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
<div class="form">
{% form_for signup %}
{% hidden_field_tag "page_id", homepage_excerpt.id %}
{% if request.sorta_logged_in? %}
<h4>Hi {{ request.current_signup.name_or_email }}, thanks for joining!</h4>
{% 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 to signup</a>.</small></div>
{% endif %}
{% endif %}
<div class="form-errors">{% error_messages_for signup %}</div>
{% if request.sorta_logged_in? == false or request.current_signup.has_name? == false %}
<div class="row">
<div class="col-md-6"><div class="form-group"><label for="signup_first_name">First Name</label>{% text_field "first_name", class:"text form-control" %}</div></div>
<div class="col-md-6"><div class="form-group"><label for="signup_last_name">Last Name</label>{% text_field "last_name", class:"text form-control" %}</div></div>
</div>
{% endif %}
{% if request.sorta_logged_in? == false or request.current_signup.has_mobile? == false %}
<div class="row">
<div class="col-md-6"><div class="form-group"><label for="signup_email">Email</label>{% email_field "email", class:"text form-control" %}</div></div>
{% if site.ask_for_mobiles? %}
<div class="col-md-6"><div class="form-group"><label for="signup_mobile_number">Mobile phone</label>{% phone_field "mobile_number", class:"text form-control" %}</div></div>
{% endif %}
</div>
<div class="row">
<div class="col-md-6"><div class="checkbox"><label for="signup_email_opt_in">{% check_box "email_opt_in", class:"checkbox" %} Send me email updates</label></div></div>
{% if site.ask_for_mobiles? %}
<div class="col-md-6"><div class="checkbox"><label for="signup_mobile_opt_in">{% check_box "mobile_opt_in", class:"checkbox" %} Send me text message updates</label></div></div>
{% endif %}
</div>
{% endif %}
{% if homepage_excerpt.signup.is_phone? %}
<div class="row">
<div class="col-md-12"><div class="form-group"><label for="signup_phone_number">Phone</label>{% phone_field "phone_number", class:"text form-control" %}</div></div>
</div>
{% endif %}
{% if homepage_excerpt.signup.is_address? %}
{% if request.sorta_logged_in? == false or request.current_signup.has_full_address? == false %}
<div class="row">
<div class="col-md-12"><div class="form-group"><label for="signup_submitted_address">Address (Street, City, State, Postal code)</label>{% text_field "submitted_address", class:"text form-control" %}</div></div>
</div>
<div class="row">
<div class="col-md-12"><div class="form-group"><label for="signup_country_code">Country</label>{% collection_select "country_code", homepage_excerpt.signup.countries, "code", "name", class:"select form-control" %}</div></div>
</div>
{% endif %}
{% endif %}
{% if homepage_excerpt.signup.has_labeled_tags? %}
{% for labeled_tag in homepage_excerpt.signup.labeled_tags %}
<div class="row-fluid">
<div class="span12">
{% if homepage_excerpt.signup.use_multiple_select_labeled_tags? %}
<label for="checkbox_{{ labeled_tag.id }}" class="checkbox"> {{ labeled_tag.checkbox }} {{ labeled_tag.name }} </label>
{% else %}
<label for="radio_button_{{ labeled_tag.id }}" class="radio"> {{ labeled_tag.radio_button }} {{ labeled_tag.name }} </label>
{% endif %}
</div>
</div>
{% endfor %}
{% endif %}
{% if homepage_excerpt.signup.is_volunteers? and site.ask_for_volunteers? %}
{% if request.sorta_logged_in? == false or request.current_signup.is_volunteer == false %}
<div class="row">
<div class="col-md-12"><div class="checkbox"><label for="signup_is_volunteer">{% check_box "is_volunteer", class:"checkbox" %} I want to volunteer</label></div></div>
</div>
{% endif %}
{% endif %}
<div class="row">
<div class="col-md-12"><div class="checkbox"><label for="signup_activity_is_private">{% check_box "activity_is_private", class:"checkbox" %} Don't publish this on the website</label></div></div>
</div>
{% if homepage_excerpt.signup.is_all_info_collected? == false %}
{% if request.sorta_logged_in? %}
{% submit_tag "Update info", class:"submit-button btn btn-primary" %}
{% else %}
{% submit_tag "Signup", class:"submit-button btn btn-primary" %}
{% endif %}
{% endif %}
<div class="form-submit"></div>
{% endform_for %}
{% if homepage_excerpt.text_keyword_instructions.size > 0 %}
<div class="row padbottom padtopmore">
<div class="col-md-12">
or {{ homepage_excerpt.text_keyword_instructions }}
</div>
</div>
{% endif %}
</div>