Simplify min/max abstract length feature
Also clarify that those are words...
This commit is contained in:
parent
bb59c9a4d9
commit
9514171e33
3 changed files with 10 additions and 13 deletions
|
|
@ -8,6 +8,6 @@ module EventTypesHelper
|
||||||
# ====Returns
|
# ====Returns
|
||||||
# * +String+ -> number of registrations / max allowed registrations
|
# * +String+ -> number of registrations / max allowed registrations
|
||||||
def event_type_select_options(event_types = {})
|
def event_type_select_options(event_types = {})
|
||||||
event_types.map { |type| ["#{type.title} - #{show_time(type.length)}", type.id] }
|
event_types.map { |type| ["#{type.title} - #{show_time(type.length)} - #{type.minimum_abstract_length} to #{type.maximum_abstract_length} words", type.id] }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,12 @@
|
||||||
= f.text_field :description, class: 'form-control'
|
= f.text_field :description, class: 'form-control'
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :minimum_abstract_length
|
= f.label :minimum_abstract_length
|
||||||
|
(words)
|
||||||
%abbr{title: 'This field is required'} *
|
%abbr{title: 'This field is required'} *
|
||||||
= f.number_field :minimum_abstract_length, size: 3, required: true, class: 'form-control'
|
= f.number_field :minimum_abstract_length, size: 3, required: true, class: 'form-control'
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :maximum_abstract_length
|
= f.label :maximum_abstract_length
|
||||||
|
(words)
|
||||||
%abbr{title: 'This field is required'} *
|
%abbr{title: 'This field is required'} *
|
||||||
= f.number_field :maximum_abstract_length, size: 3, required: true, class: 'form-control'
|
= f.number_field :maximum_abstract_length, size: 3, required: true, class: 'form-control'
|
||||||
.form-group
|
.form-group
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,12 @@
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :event_type_id, 'Type'
|
= f.label :event_type_id, 'Type'
|
||||||
= f.select :event_type_id, event_type_select_options(@conference.program.event_types), { include_blank: false }, { class: 'select-help-toggle form-control' }
|
= f.select :event_type_id, event_type_select_options(@conference.program.event_types), { include_blank: false }, { class: 'select-help-toggle form-control' }
|
||||||
|
= render 'shared/select_help_text', f: f, for: :event_type_id, options: @conference.program.event_types do |event_type|
|
||||||
|
= event_type.description
|
||||||
- if @program.languages.present?
|
- if @program.languages.present?
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :language
|
= f.label :language
|
||||||
= f.select :language, @program.languages_list, { include_blank: false}, { class: 'select-help-toggle form-control' }
|
= f.select :language, @program.languages_list, { include_blank: false}, { class: 'select-help-toggle form-control' }
|
||||||
= render 'shared/select_help_text', f: f, for: :event_type_id, options: @conference.program.event_types do |event_type|
|
|
||||||
= event_type.description
|
|
||||||
- if display_details
|
- if display_details
|
||||||
- if @conference.program.difficulty_levels.any?
|
- if @conference.program.difficulty_levels.any?
|
||||||
= f.label :difficulty_level
|
= f.label :difficulty_level
|
||||||
|
|
@ -43,19 +43,14 @@
|
||||||
= difficulty_level.description
|
= difficulty_level.description
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :abstract
|
= f.label :abstract
|
||||||
|
%p
|
||||||
|
You have used
|
||||||
|
%span#abstract-count
|
||||||
|
= @event.abstract_word_count
|
||||||
|
words.
|
||||||
= f.text_area :abstract, required: true, rows: 5, data: { provide: 'markdown' }, class: 'form-control'
|
= f.text_area :abstract, required: true, rows: 5, data: { provide: 'markdown' }, class: 'form-control'
|
||||||
%span.help-block
|
%span.help-block
|
||||||
= markdown_hint('[Tips to improve your presentations.](http://blog.hubspot.com/blog/tabid/6307/bid/5975/10-Rules-to-Instantly-Improve-Your-Presentations.aspx)')
|
= 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.
|
|
||||||
- if display_registration && display_details
|
- if display_registration && display_details
|
||||||
%h4
|
%h4
|
||||||
Event Registration
|
Event Registration
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue