72 lines
3 KiB
Text
72 lines
3 KiB
Text
= semantic_form_for(@event, url: @url) do |f|
|
|
= f.inputs name: 'Proposal Information' do
|
|
= f.input :title, as: :string, input_html: { autofocus: true }, required: true
|
|
|
|
= f.input :subtitle, as: :string
|
|
|
|
= speaker_selector_input f
|
|
|
|
- if current_user.manages_volunteers?(@conference)
|
|
= volunteer_selector_input f
|
|
|
|
= track_selector_input f
|
|
|
|
- if @program.languages.present?
|
|
= f.input :language, as: :select,
|
|
collection: @languages,
|
|
include_blank: false, label: 'Language', input_html: { class: 'select-help-toggle' }
|
|
|
|
- if @program.difficulty_levels.present?
|
|
= f.input :difficulty_level, as: :select, collection: @program.difficulty_levels,
|
|
input_html: { class: 'select-help-toggle' },
|
|
include_blank: '(Please select)' if @conference.program.difficulty_levels.any?
|
|
|
|
- @program.difficulty_levels.each do |difficulty_level|
|
|
%span{ class: 'help-block select-help-text collapse event_difficulty_level_id', id: "#{difficulty_level.id}-help" }
|
|
= difficulty_level.description
|
|
|
|
= render 'proposals/submission_type_content_form', f: f, program: @program
|
|
|
|
-# TODO-SNAPCON: Extract this to be a `conference_committee_role?`
|
|
- if current_user.has_any_role?(:admin, { name: :organizer, resource: @conference }, { name: :cfp, resource: @conference })
|
|
%br
|
|
= f.input :committee_review,
|
|
input_html: { rows: 5, data: { provide: 'markdown' } },
|
|
hint: markdown_hint('This field is shared with the submission authors.')
|
|
- elsif @event.committee_review.present?
|
|
%br
|
|
%strong.control-label Committee Review
|
|
%small
|
|
Use this feedback to improve your submission.
|
|
.well
|
|
= markdown(@event.committee_review)
|
|
|
|
- if @program.cfp&.enable_registrations?
|
|
= f.inputs 'Enable pre-registration' do
|
|
= f.input :require_registration, label: 'Require participants to register to your event'
|
|
- message = @event.room ? "Value must be between 1 and #{@event.room.size}" : 'Check room capacity after scheduling.'
|
|
= f.input :max_attendees, hint: 'The maximum number of participants. ' + message
|
|
|
|
%p.text-right
|
|
= link_to '#description', 'data-toggle' => 'collapse' do
|
|
Do you require something special?
|
|
#description{ class: "collapse #{ 'in' if @event.description.present? }" }
|
|
= f.input :description, input_html: { rows: 5 }, label: 'Requirements', placeholder: 'Eg. Whiteboard, printer, or something like that.'
|
|
|
|
- if current_user.has_any_role? :admin, { name: :organizer, resource: @conference }, { name: :cfp, resource: @conference }
|
|
%p (Admin Only)
|
|
= f.input :is_highlight
|
|
|
|
%p.text-right
|
|
- if @event.new_record?
|
|
= f.submit 'Submit Proposal', class: 'btn btn-success'
|
|
- else
|
|
= f.submit 'Update Proposal', class: 'btn btn-primary'
|
|
|
|
:javascript
|
|
$(document).ready(function() {
|
|
$('.js-userSelector').selectize({
|
|
plugins: ['remove_button'],
|
|
maxItems: 100
|
|
})
|
|
});
|