Skip to content

Commit fbca9a8

Browse files
authored
Merge pull request #281 from fuseumass/updateRegistrationForm
Update registration form
2 parents 6258669 + b769180 commit fbca9a8

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

app/controllers/event_applications_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def event_application_params
284284
end
285285
params.require(:event_application).permit(:name, :phone, :age, :gender, :university, :major, :grad_year,
286286
:food_restrictions, :food_restrictions_info, :resume, :t_shirt_size, :education_lvl,
287-
:waiver_liability_agreement, :mlh_agreement,
287+
:waiver_liability_agreement, :mlh_agreement, :mlh_communications,
288288
custom_fields: custom_fields_items)
289289
end
290290

app/views/event_applications/_form.html.erb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ window.MIN_RESUME_AGE = <%= HackumassWeb::Application::EVENT_APPLICATION_OPTIONS
152152

153153
<div class="form-group">
154154
<%= f.label :resume,
155-
'Resume: (.PDF)',
155+
"Résumé: (Uploading a résumé is optional and may be shared with sponsors. Please only upload a .pdf document.)",
156156
class: 'form-label' %>
157157
<div class="custom-file">
158158
<%= f.file_field :resume, class:'custom-file-input', onchange: 'updateResumeFileLabel()' %>
@@ -239,6 +239,16 @@ window.MIN_RESUME_AGE = <%= HackumassWeb::Application::EVENT_APPLICATION_OPTIONS
239239
</div>
240240
<% end %>
241241

242+
<% unless HackumassWeb::Application::EVENT_APPLICATION_OPTIONS['hide_mlh_comms'] %>
243+
<div class="form-group event-application-form-group">
244+
<%= f.label :mlh_communications,
245+
'[OPTIONAL] Communication from MLH: :',
246+
class: 'form-label' %>
247+
<%= f.check_box :mlh_communications, {}, true, false %>
248+
<%= render file: HackumassWeb::Application::copy_for('event_applications/form_communications_mlh') %>
249+
</div>
250+
<% end %>
251+
242252
<% if editing_application? %>
243253
<div class="event-application-flex-end-container">
244254
<%= f.submit 'Update Application',
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddMlhCommunicationsToEventApplications < ActiveRecord::Migration[5.2]
2+
def change
3+
add_column :event_applications, :mlh_communications, :boolean
4+
end
5+
end

db/schema.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema.define(version: 2020_06_18_042555) do
13+
ActiveRecord::Schema.define(version: 2022_10_13_150340) do
1414

1515
# These are extensions that must be enabled in order to support this database
1616
enable_extension "plpgsql"
@@ -56,6 +56,7 @@
5656
t.string "gender"
5757
t.string "pronoun"
5858
t.json "custom_fields"
59+
t.boolean "mlh_communications"
5960
end
6061

6162
create_table "event_attendances", force: :cascade do |t|

0 commit comments

Comments
 (0)