forked from railsbridge/bridge_troll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_form.html.erb
184 lines (157 loc) · 7.66 KB
/
_form.html.erb
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
<%= simple_nested_form_for @event do |f| %>
<%= render 'shared/model_error_messages', model: @event %>
<h2>Basic Event Information</h2>
<div class="field">
<%= f.input :title, required: false %>
</div>
<div class="field">
<div>
<%= f.label :location_id %>
</div>
<%= collection_select(:event, :location_id, Location.all, :id, :name_with_chapter, {prompt: true}, {class: 'select2-dropdown'}) %>
<p>
<em>If your location isn't in this list, head over to the <%= link_to 'locations page', locations_path %> and add
it before you continue.</em>
</p>
</div>
<div class="field workshop-only">
<div>
<%= f.label :course_id %>
</div>
<%= collection_select :event, :course_id, Course.all, :id, :title, {}, {class: 'form-control'} %>
</div>
<div class="field">
<%= f.input :time_zone, priority: ActiveSupport::TimeZone.us_zones, include_blank: 'Select Time Zone', required: false %>
</div>
<div class="field">
<%= f.input :public_email, label: 'What email address should users contact you at with questions?' %>
</div>
<h3>Sessions</h3>
<p>
<em>There should be one session for each thing that a student or volunteer might be checked in for. This usually means 'Installfest' and 'Workshop'. If there's no Installfest, just keep the one session.</em>
</p>
<p>
<em>If "Required for Students" is checked, the RSVP form will not let students deselect the session. (Volunteers can always choose which sessions they will be attending.)</em>
</p>
<div class="event-sessions">
<%= f.fields_for :event_sessions do |event_sessions_form| %>
<span class="remove-session hidden pull-right">(<a href="#">Remove Session</a>)</span>
<%= event_sessions_form.input :name, label: 'Session Name', required: false %>
<div class='form-group'>
<%= event_sessions_form.text_field :session_date, class: 'datepicker form-control' %>
<%= event_sessions_form.time_select :starts_at, {:ampm => true, :minute_step => 15}, {class: "input-small start_time form-control"} %>
-
<%= event_sessions_form.time_select :ends_at, {:ampm => true, :minute_step => 15}, {class: "input-small end_time form-control"} %>
</div>
<div class='form-group session-checkboxes'>
<%= event_sessions_form.label :required_for_students do %>
<%= event_sessions_form.check_box :required_for_students, class: 'exclusive-checkbox' %> Required for Students?
<% end %>
<%= event_sessions_form.label :volunteers_only do %>
<%= event_sessions_form.check_box :volunteers_only, class: 'exclusive-checkbox' %> Volunteers Only!
<% end %>
</div>
<% end %>
<%= f.link_to_add :event_sessions, class: 'btn btn-info' do %>
<i class='fa fa-plus-square' style='margin-right: 5px;'></i>Add another session
<% end %>
</div>
<h2 class="mb-10-only">Who can attend?</h2>
<h3>Event Type</h3>
<div class="field non-bolded">
<div>
<%= label_tag do %>
<%= f.radio_button :allow_student_rsvp, true, class: 'rsvp-types-radio' %> Students and Volunteers (normal workshop)
<% end %>
</div>
<div>
<%= label_tag do %>
<%= f.radio_button :allow_student_rsvp, false, class: 'rsvp-types-radio' %> Just Volunteers (work party, teacher
training)
<% end %>
</div>
</div>
<h3>Announcement Email</h3>
<% unless @event.published? %>
<div class="field non-bolded">
<%= f.label :email_on_approval do %>
<%= f.check_box :email_on_approval %> Send announcement email to chapter when the event is approved
<% end %>
</div>
<% end %>
<div class="field workshop-only">
<h3>Ask for plus-one host name?</h3>
<p>Historically, *Bridge workshops for women have allowed men to attend as the guest of a woman. If you want to do a similar +1 thing, you can ask attendees to list who they are the guest of.</p>
<p>The plus-one host form says this:</p>
<blockquote>
<p>All workshops on Bridge Troll focus on providing opportunities for under-represented populations in tech. If you are not a member of an underrepresented group, you can only attend as a student if you're the guest of someone who is a member of the workshop's target population. (For example, men can come as the guest of a woman, a straight person can attend as the guest of a gay person, etc.)
</p>
<p>If you are not a member of this workshop's target demographic, list the name of the person who is bringing you here: [text field]
</p>
</blockquote>
<p>If your workshop isn't open to +1s, you can choose not to show that field.</p>
<div>
<%= label_tag do %>
<%= f.radio_button :plus_one_host_toggle, true %> Show plus-one host name form
<% end %>
</div>
<div>
<%= label_tag do %>
<%= f.radio_button :plus_one_host_toggle, false %> Don't show plus-one host name form
<% end %>
</div>
</div>
<div class='workshop-only'>
<h3>Capacity</h3>
<p>
This sets be the maximum number of <strong>students</strong> you think could fit in your event.
There is not a limit on the number of volunteer RSVPs, so you should consider
the number of expected volunteers when determining student capacity. Most workshops
have less than one volunteer for every student.
</p>
</div>
<div class="field workshop-only">
<%= f.input :student_rsvp_limit, label: 'Student RSVP limit' %>
<p>
After this event is published, you can <strong>increase</strong> this number, but you cannot decrease it below the number of RSVP'd attendees.
</p>
</div>
<h2>Event Description</h2>
<div class="field">
<p>We will automatically include the name of the course and a link to the corresponding class levels, so that should not be duplicated here.</p>
<p>You can use basic html, like:</p>
<ul class="margined">
<li><pre><%= "<img src='http://example.com/sponsor/logo'>" %></pre></li>
<li><pre><%= "<a href='http://bridgetroll.org'>Link Text</a>" %></pre></li>
<li><pre><%= "<h3>Littler Header</h3>" %></pre></li>
</ul>
<p>But you don't have to put paragraph tags around everything; blank lines will do just fine.</p>
<%= f.input :details, as: :text, input_html: {rows: 14} %>
</div>
<h3>Post-RSVP Details</h3>
<p>The following details will be included in the confirmation & reminder emails and will appear at the bottom of the
event detail page <em>after</em> the student or volunteer has signed up.</p>
<div class="field">
<%= f.input :volunteer_details, label: 'Volunteer Details', input_html: {rows: 4} %>
</div>
<div class="field workshop-only">
<%= f.input :student_details, label: 'Student Details', input_html: {rows: 4} %>
</div>
<% if @event.new_record? %>
<h2>Ready to create your Event? Hold on a second...</h2>
<p>If you're organizing a workshop, make sure you've read over the
<a href="https://github.com/railsbridge/docs/wiki/Cookbook">Organizer's Cookbook</a> so you know what you're getting into.</p>
<p>Pay particular attention to the
<a href="https://github.com/railsbridge/docs/wiki/Workshop-Planning-Tasks">Workshop Planning Tasks</a> page. You're already posting an event on Bridge Troll, which is a thing on that page!</p>
<div class="field">
<%= label_tag :coc, class: 'question' do %>
<strong><%= check_box_tag :coc, '1', params[:coc] %>
I accept the <a href="http://bridgefoundry.org/code-of-conduct/" target="_blank">Code of Conduct</a> and will communicate it at the beginning of the event.
</strong>
<% end %>
</div>
<% end %>
<div class="actions">
<%= f.submit class: 'btn btn-submit' %>
</div>
<% end %>