Use 'Description' on the submissions page. Fill template from submission_instructions

This commit is contained in:
Michael Ball 2021-03-22 02:59:35 -07:00
parent b4a174944e
commit 75b60c2578
2 changed files with 10 additions and 7 deletions

View file

@ -49,6 +49,8 @@ $(function () {
$('.' + id).collapse('hide'); $('.' + id).collapse('hide');
$('#' + $(this).val() + '-help.' + id).collapse('show'); $('#' + $(this).val() + '-help.' + id).collapse('show');
$('#' + $(this).val() + '-instructions.' + id).collapse('show');
}); });
$('.dropdown-toggle').dropdown(); $('.dropdown-toggle').dropdown();
@ -165,7 +167,7 @@ $( document ).ready(function() {
var min = $selected.data("min-words"); var min = $selected.data("min-words");
// Set the filler text for the submission text // 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); $("#abstract-maximum-word-count").text(max);
$("#submission-maximum-word-count").text(max); $("#submission-maximum-word-count").text(max);

View file

@ -31,19 +31,20 @@
= f.inputs name: 'Proposal Information' do = f.inputs name: 'Proposal Information' do
= f.input :title, as: :string, required: true, input_html: { required: true } = 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? - if @program.languages.present?
= f.input :language, as: :select, = f.input :language, as: :select,
collection: @languages, collection: @languages,
include_blank: false, label: 'Language', input_html: { class: 'select-help-toggle' } 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| - @program.event_types.each do |event_type|
%div{ class: 'help-block event_event_type_id collapse', id: "#{event_type.id}-help"} %div{ class: 'help-block event_event_type_id collapse', id: "#{event_type.id}-help"}
%strong Directions %strong Description
%div %div
= markdown(event_type.description) = markdown(event_type.description)
@ -63,7 +64,7 @@
%br %br
- @conference.program.event_types.each do |event_type| - @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 %h3
= event_type.name = event_type.name
Instructions Instructions