mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #3564 from hennevogel/bugfix/3396
Simplify min/max abstract length
This commit is contained in:
commit
89ad8a6bac
3 changed files with 10 additions and 13 deletions
|
|
@ -8,6 +8,6 @@ module EventTypesHelper
|
|||
# ====Returns
|
||||
# * +String+ -> number of registrations / max allowed registrations
|
||||
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
|
||||
|
|
|
|||
|
|
@ -16,10 +16,12 @@
|
|||
= f.text_field :description, class: 'form-control'
|
||||
.form-group
|
||||
= f.label :minimum_abstract_length
|
||||
(words)
|
||||
%abbr{title: 'This field is required'} *
|
||||
= f.number_field :minimum_abstract_length, size: 3, required: true, class: 'form-control'
|
||||
.form-group
|
||||
= f.label :maximum_abstract_length
|
||||
(words)
|
||||
%abbr{title: 'This field is required'} *
|
||||
= f.number_field :maximum_abstract_length, size: 3, required: true, class: 'form-control'
|
||||
.form-group
|
||||
|
|
|
|||
|
|
@ -29,12 +29,12 @@
|
|||
.form-group
|
||||
= 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' }
|
||||
= 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?
|
||||
.form-group
|
||||
= f.label :language
|
||||
= 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 @conference.program.difficulty_levels.any?
|
||||
= f.label :difficulty_level
|
||||
|
|
@ -43,19 +43,14 @@
|
|||
= difficulty_level.description
|
||||
.form-group
|
||||
= 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'
|
||||
%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)')
|
||||
%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
|
||||
%h4
|
||||
Event Registration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue