Skip to content

Commit

Permalink
Users can submit proposals with spoken_language
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Dec 11, 2024
1 parent 7489cf8 commit 377779b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/proposals_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def parse_edit_field
private

def proposal_params
params.require(:proposal).permit(:title, {tags: []}, :session_format_id, :track_id, :abstract, :details, :pitch, custom_fields: @event.custom_fields,
params.require(:proposal).permit(:title, {tags: []}, :session_format_id, :track_id, :abstract, :details, :pitch, :spoken_language, {custom_fields: @event.custom_fields},
comments_attributes: [:body, :proposal_id, :user_id],
speakers_attributes: [:bio, :id])
end
Expand Down
5 changes: 5 additions & 0 deletions app/views/proposals/_contents.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
.markdown{ data: { 'field-id' => 'proposal_pitch' } }
=proposal.pitch_markdown

.proposal-section
%h3.control-label Spoken Language
.markdown{ data: { 'field-id' => 'proposal_spoken_language' } }
=proposal.spoken_language

- unless proposal.custom_fields.empty?
- proposal.proposal_data[:custom_fields].select do |key,value|
.proposal-section
Expand Down
3 changes: 3 additions & 0 deletions app/views/proposals/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
= f.input :pitch, input_html: { class: 'watched', rows: 5 },
hint: 'Explain why this talk should be considered and what makes you qualified to speak on the topic.'#, popover_icon: { content: pitch_tooltip }

= f.input :spoken_language, as: :radio_buttons, wrapper: 'vertical_radio_and_checkboxes', input_html: { class: 'watched' }, collection: ['EN', 'JA'],
hint: 'With which language would you speak?'

- unless event.custom_fields.empty?
- event.custom_fields.each do |custom_field|
.form-group
Expand Down

0 comments on commit 377779b

Please sign in to comment.