diff --git a/app/assets/javascripts/osem.js b/app/assets/javascripts/osem.js index 636ed959..59c5249b 100644 --- a/app/assets/javascripts/osem.js +++ b/app/assets/javascripts/osem.js @@ -49,6 +49,8 @@ $(function () { $('.' + id).collapse('hide'); $('#' + $(this).val() + '-help.' + id).collapse('show'); + $('#' + $(this).val() + '-instructions.' + id).collapse('show'); + }); $('.dropdown-toggle').dropdown(); @@ -165,7 +167,7 @@ $( document ).ready(function() { var min = $selected.data("min-words"); // Set the filler text for the submission text - fill_if_empty('event_submission_text', $selected.data("help")); + fill_if_empty('event_submission_text', $selected.data("instructions")); $("#abstract-maximum-word-count").text(max); $("#submission-maximum-word-count").text(max); diff --git a/app/views/proposals/new.html.haml b/app/views/proposals/new.html.haml index 9c9a7004..15fba9ac 100644 --- a/app/views/proposals/new.html.haml +++ b/app/views/proposals/new.html.haml @@ -31,19 +31,20 @@ = f.inputs name: 'Proposal Information' do = f.input :title, as: :string, required: true, input_html: { required: true } - = f.input :event_type_id, as: :select, - collection: @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, help: type.description }]}, - include_blank: false, label: 'Type', input_html: { class: 'select-help-toggle' } - if @program.languages.present? = f.input :language, as: :select, collection: @languages, include_blank: false, label: 'Language', input_html: { class: 'select-help-toggle' } + = f.input :event_type_id, as: :select, + collection: @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, instructions: type.submission_instructions }]}, + include_blank: false, label: 'Type', input_html: { class: 'select-help-toggle' } + - @program.event_types.each do |event_type| %div{ class: 'help-block event_event_type_id collapse', id: "#{event_type.id}-help"} - %strong Directions + %strong Description %div = markdown(event_type.description) @@ -63,7 +64,7 @@ %br - @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" } + %span{ class: 'help-block select-help-text event_event_type_id collapse', id: "#{event_type.id}-instructions" } %h3 = event_type.name Instructions