2015-04-16 18:34:41 +03:00
= semantic_form_for(@event, url: @url) do |f|
= f.inputs name: 'Proposal Information' do
2017-12-11 02:01:58 +02:00
= f.input :title, as: :string, input_html: { autofocus: true }, required: true
2015-04-16 18:34:41 +03:00
= f.input :subtitle, as: :string
2017-04-22 09:40:08 +03:00
= speaker_selector_input f
2017-02-02 16:34:59 +02:00
2020-07-25 17:38:44 -07:00
- if current_user.manages_volunteers?(@conference)
= volunteer_selector_input f
2017-07-14 15:57:34 +03:00
= track_selector_input f
2016-03-05 02:54:09 +01:00
2015-04-16 18:34:41 +03:00
= f.input :event_type_id, as: :select,
2015-10-25 13:29:02 +02:00
collection: @conference.program.event_types.map {|type| ["#{type.title} - #{show_time(type.length)}", type.id,
2021-02-18 23:27:20 -08:00
data: { min_words: type.minimum_abstract_length, max_words: type.maximum_abstract_length, help: type.description }]},
2015-04-16 18:34:41 +03:00
include_blank: false, label: 'Type', input_html: { class: 'select-help-toggle' }
2016-03-21 00:18:20 +01:00
- if @program.languages.present?
= f.input :language, as: :select,
collection: @languages,
include_blank: false, label: 'Language', input_html: { class: 'select-help-toggle' }
2015-10-25 13:29:02 +02:00
- @conference.program.event_types.each do |event_type|
2015-04-16 18:34:41 +03:00
%span{ class: 'help-block select-help-text event_event_type_id collapse', id: "#{event_type.id}-help" }
= event_type.description
2015-10-25 13:29:02 +02:00
= f.input :difficulty_level, as: :select, collection: @conference.program.difficulty_levels, input_html: { class: 'select-help-toggle' },
include_blank: '(Please select)' if @conference.program.difficulty_levels.any?
2015-04-16 18:34:41 +03:00
2015-10-25 13:29:02 +02:00
- @conference.program.difficulty_levels.each do |difficulty_level|
2015-04-16 18:34:41 +03:00
%span{ class: 'help-block select-help-text collapse event_difficulty_level_id', id: "#{difficulty_level.id}-help" }
= difficulty_level.description
2020-04-04 21:48:31 -07:00
= f.input :abstract, required: true, input_html: { rows: 5, data: { provide: 'markdown' } },
2017-03-06 20:54:21 +05:30
hint: markdown_hint('[Tips to improve your presentations.](http://blog.hubspot.com/blog/tabid/6307/bid/5975/10-Rules-to-Instantly-Improve-Your-Presentations.aspx)')
2015-04-16 18:34:41 +03:00
%p
You have used
%span#abstract-count #{@event.abstract_word_count}
words. Abstracts must be between
%span#abstract-minimum-word-count
0
and
%span#abstract-maximum-word-count
250
words.
2021-02-18 23:27:20 -08:00
%br
2021-03-07 12:56:45 -08:00
- @conference.program.event_types.each do |event_type|
%span{ class: 'help-block select-help-text event_event_type_id collapse', id: "#{event_type.id}-help" }
%h3
= event_type.name
Instructions
= markdown(event_type.submission_instructions)
2021-02-18 23:27:20 -08:00
= f.input :submission_text, input_html: { rows: 5, data: { provide: 'markdown' }, placeholder: '' },
hint: markdown_hint('Only conference organizers will read this.')
2021-03-06 22:56:01 -08:00
%button.btn.btn-primary.primary-button{ type: 'button', id: 'sub_text_reset', data: { confirm: 'Do you really want to reset your submission text to the provided template?' } } Reset to Template
2021-02-16 13:45:38 -08:00
%p
You have used
2021-02-18 23:27:20 -08:00
%span#submission-count #{@event.submission_word_count}
2021-02-16 13:45:38 -08:00
words. Submission descriptions must be between
2021-02-18 23:27:20 -08:00
%span#submission-minimum-word-count
2021-02-16 13:45:38 -08:00
0
and
2021-02-18 23:27:20 -08:00
%span#submission-maximum-word-count
2021-02-16 13:45:38 -08:00
250
words.
2020-01-06 22:49:55 +02:00
- if current_user.is_admin? or @program.cfp&.enable_registrations?
2018-10-18 12:01:42 -07:00
= 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
2014-12-13 21:13:19 +02:00
2014-12-19 12:29:20 +02:00
- if current_user.has_any_role? :admin, { name: :organizer, resource: @conference }, { name: :cfp, resource: @conference }
2015-04-16 18:34:41 +03:00
= f.input :is_highlight
%p.text-right
2015-10-06 14:15:38 +03:00
= link_to '#description', 'data-toggle' => 'collapse' do
2015-04-16 18:34:41 +03:00
Do you require something special?
2017-02-07 19:45:49 +05:30
#description{ class: "collapse #{ 'in' if @event.description.present? }" }
2015-04-16 18:34:41 +03:00
= f.input :description, input_html: { rows: 5 }, label: 'Requirements', placeholder: 'Eg. Whiteboard, printer, or something like that.'
2014-07-23 16:24:05 +02:00
%p.text-right
2017-02-02 16:34:59 +02:00
- if @event.new_record?
2021-02-23 22:19:26 -08:00
= f.submit 'Submit Proposal', class: 'btn btn-success'
2017-02-02 16:34:59 +02:00
- else
= f.submit 'Update Proposal', class: 'btn btn-success'
:javascript
$(document).ready(function() {
2020-07-25 17:38:44 -07:00
$('.js-userSelector').selectize({
2017-02-02 16:34:59 +02:00
plugins: ['remove_button'],
2020-06-24 02:55:20 -07:00
maxItems: 100
2020-07-25 17:38:44 -07:00
})
2017-02-02 16:34:59 +02:00
});