= form_for @course, :html => { :multipart => true } do |f|
  - if @course.errors.any?
    #error_explanation
      %h2= "#{pluralize(@course.errors.count, "error")} prohibited this course from being saved:"
      %ul
        - @course.errors.full_messages.each do |msg|
          %li= msg
  .row
    .columns.large-8.small-6
      = f.label :title
      = f.text_field :title
    .columns.large-4.small-6
      = f.label :language
      = f.select :language, LanguageList::COMMON_LANGUAGES.map{ |language| [language.name, language.iso_639_1] }
  = f.label :description
  = f.text_area :description, rows: 8
  = f.label :prerequisites
  = f.text_area :prerequisites, rows: 6
  = f.label 'Slides'
  = f.file_field :slides
  .row
    .columns.large-10
      = f.label 'Starting Date'
      = datetime_select :course, :starts_at, {time_separator: '', datetime_separator: '',
        prompt: true}, {class: 'large-2 columns end'}
    .columns.large-2
      = f.label 'Duration (hours)'
      = f.text_field :duration, type: 'number'
  = f.submit 'Save', class: 'button'
