Support markdown in more fields

This commit is contained in:
Michael Ball 2020-01-07 15:38:17 -08:00
parent 16d2d8c4f0
commit bff830ec55
3 changed files with 7 additions and 6 deletions

View file

@ -8,10 +8,11 @@
= @event_type.title
.row
.col-md-12
= semantic_form_for(@event_type, url: (@event_type.new_record? ? admin_conference_program_event_types_path : admin_conference_program_event_type_path(@conference.short_title, @event_type))) do |f|
- form_url = (@event_type.new_record? ? admin_conference_program_event_types_path : admin_conference_program_event_type_path(@conference.short_title, @event_type))
= semantic_form_for(@event_type, url: form_url) do |f|
= f.input :title, input_html: { autofocus: true }
= f.input :length, input_html: {size: 3, type: 'number', step: @event_type.program.schedule_interval, min: @event_type.program.schedule_interval}
= f.input :description
= f.input :description, as: :text, hint: markdown_hint, input_html: { rows: 5, data: { provide: 'markdown-editable' } }
= f.input :minimum_abstract_length, input_html: {size: 3}
= f.input :maximum_abstract_length, input_html: {size: 3}
= f.input :color, input_html: { size: 6, type: 'color' }

View file

@ -20,7 +20,7 @@
%td
= event_type.title
%td
= event_type.description
= markdown(event_type.description)
%td
= event_type.length
Minutes

View file

@ -7,7 +7,7 @@
- if @program.cfp.description.present?
.row
.col-md-12
= markdown(@program.cfp.description)
= markdown(@program.cfp.description, escape_html=false)
.row
.col-md-12
= render partial: 'encouragement_text'
@ -43,10 +43,10 @@
- @program.event_types.each do |event_type|
%span{ class: 'help-block event_event_type_id collapse', id: "#{event_type.id}-help" }
= event_type.description
= markdown(event_type.description)
= f.input :abstract, required: true, input_html: { rows: 5, data: { provide: 'markdown-editable' } },
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)')
hint: markdown_hint
%p
You have used