osem-fcy/app/views/proposals/_proposal_form.html.haml

74 lines
3.1 KiB
Text
Raw Normal View History

= semantic_form_for(@event, url: @url) do |f|
= f.inputs name: 'Proposal Information' do
= f.input :title, as: :string, required: true
= f.input :subtitle, as: :string
= speaker_selector_input f
= track_selector_input f
2016-03-05 02:54:09 +01:00
= f.input :event_type_id, as: :select,
collection: @conference.program.event_types.map {|type| ["#{type.title} - #{show_time(type.length)}", type.id,
data: { min_words: type.minimum_abstract_length, max_words: type.maximum_abstract_length }]},
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' }
- @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" }
= event_type.description
= 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?
- @conference.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
2016-08-09 00:05:16 +02:00
= f.input :abstract, required: true, input_html: { rows: 5, data: { provide: 'markdown-editable' } },
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)')
%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.
2016-04-22 18:18:46 +03: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
- if current_user.has_any_role? :admin, { name: :organizer, resource: @conference }, { name: :cfp, resource: @conference }
= f.input :is_highlight
%p.text-right
2015-10-06 14:15:38 +03:00
= 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.'
2014-07-23 16:24:05 +02:00
%p.text-right
- if @event.new_record?
= f.submit 'Create Proposal', class: 'btn btn-success'
- else
= f.submit 'Update Proposal', class: 'btn btn-success'
:javascript
$(document).ready(function() {
$('#event_speaker_ids').selectize({
plugins: ['remove_button'],
maxItems: 5
} )
});