From 1a24533b00ff3cfa4b75282f01c2456ededdfc80 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Sun, 7 Mar 2021 12:56:45 -0800 Subject: [PATCH] Display submission instructions on the new/edit forms --- app/views/proposals/_proposal_form.html.haml | 17 +++++-------- app/views/proposals/new.html.haml | 25 ++++++++++---------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/app/views/proposals/_proposal_form.html.haml b/app/views/proposals/_proposal_form.html.haml index 5b4e7079..463cafa1 100644 --- a/app/views/proposals/_proposal_form.html.haml +++ b/app/views/proposals/_proposal_form.html.haml @@ -47,21 +47,16 @@ words. %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" } + %h3 + = event_type.name + Instructions + = markdown(event_type.submission_instructions) = f.input :submission_text, input_html: { rows: 5, data: { provide: 'markdown' }, placeholder: '' }, hint: markdown_hint('Only conference organizers will read this.') - %p - You have used - %span#submission-count #{@event.submission_word_count} - words. Submission descriptions must be between - %span#submission-minimum-word-count - 0 - and - %span#submission-maximum-word-count - 250 - words. - - if current_user.is_admin? or @program.cfp.enable_registrations? = f.inputs 'Enable pre-registration' do = f.input :require_registration, label: 'Require participants to register to your event' diff --git a/app/views/proposals/new.html.haml b/app/views/proposals/new.html.haml index bdd16e11..41969acc 100644 --- a/app/views/proposals/new.html.haml +++ b/app/views/proposals/new.html.haml @@ -61,22 +61,21 @@ 250 words. + %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" } + %h3 + = event_type.name + Instructions + %p Please use this as the template for your submission. + This part of the submissions is intended only for the conference committee. + %hr + = markdown(event_type.submission_instructions) + + = f.input :submission_text, input_html: { rows: 5, data: { provide: 'markdown' } }, hint: markdown_hint - %p - You have used - %span#submission-count #{@event.submission_word_count} - words. Submission descriptions must be between - %span#submission-minimum-word-count - 0 - and - %span#submission-maximum-word-count - 250 - words. - - - - if @program.cfp.enable_registrations? = f.input :require_registration, label: 'Require participants to register to your event'