<commit_before>- page_title t("event.new_event")

.row
  .medium-12.columns
    %ul.breadcrumbs
      %li
        = link_to t("home"), root_path
      %li
        = link_to @conference.title, conference_path(@conference)
      %li.current
        = t("event.new_event")

.row
  .large-12.columns
    %h2.subheader Placeholder
    %hr
.row
  .large-12.columns
    %h5.subheader
      = t("event.complete_detailed_form")

= form_for(@event, url: wizard_path, method: :put) do |f|

  .row
    .large-12.columns
      #speakers
        = f.fields_for :speakers do |speaker|
          = render "speaker_fields", f: speaker
        .links
          = link_to_add_association t("speaker.add"), f, :speakers, class: "button small radius success"

  .row
    .large-12.columns
      %label
        %i.fa.fa-link.fa-fw.fa-lg.subheader
        = t("event.url")
      = f.url_field :content_url, label: false, maxlength: 128, type: "url", class: "radius"

  .row
    .large-12.columns
      %label{for: "tags"}
        %i.fa.fa-tags.fa-fw.fa-lg.subheader
        = t("event.tags")
        %i.fa.fa-question-circle.fa-fw{"aria-haspopup" => "true", "data-tooltip" => "", title: t("event.tag_format")}
      = f.text_field :tags, label: false, maxlength: 128, class: "radius", placeholder: t("event.tag_format")

  .row
    .large-4.columns
      %label{for: "language"}
        %i.fa.fa-globe.fa-fw.fa-lg.subheader
        = t("event.language")
      = select("event", "language", t("event.languages").keys.collect {|l| [t("event.languages.#{l}").humanize, l]},{include_blank: true, selected: "selected"}, class: "radius")

    .large-4.columns
      %label{for: "duroation"}
        %i.fa.fa-clock-o.fa-fw.fa-lg.subheader
        = t("event.duration").humanize
      %select
        = options_for_select([['30 min',1], ['1 hora',2]],  class: "radius")

    .large-4.columns
      %label{for: "level"}
        %i.fa.fa-lightbulb-o.fa-lg.subheader
        = t("event.level")
      = select("event", "level", Event.levels.keys.collect {|l| [t("event.levels.#{l}").humanize, l]}, { selected: "selected"}, class: "radius", label: false)
      /%span.level-name

      -# .row.hide-for-touch
      -#   .large-12.columns
      -#     - Event.levels.keys.each do |l|
      -#       = radio_button("event", "level", "#{l}")
      -#       %label
      -#         = t("event.levels.#{l}").humanize

  .row
    .large-12.columns
      %label{for: "comments"}
        %i.fa.fa-comments.fa-fw.fa-lg.subheader<commit_msg>Reintroduced blank option for levels and set language and level selection as required<commit_after>- page_title t("event.new_event")

.row
  .medium-12.columns
    %ul.breadcrumbs
      %li
        = link_to t("home"), root_path
      %li
        = link_to @conference.title, conference_path(@conference)
      %li.current
        = t("event.new_event")

.row
  .large-12.columns
    %h2.subheader Placeholder
    %hr
.row
  .large-12.columns
    %h5.subheader
      = t("event.complete_detailed_form")

= form_for(@event, url: wizard_path, method: :put) do |f|

  .row
    .large-12.columns
      #speakers
        = f.fields_for :speakers do |speaker|
          = render "speaker_fields", f: speaker
        .links
          = link_to_add_association t("speaker.add"), f, :speakers, class: "button small radius success"

  .row
    .large-12.columns
      %label
        %i.fa.fa-link.fa-fw.fa-lg.subheader
        = t("event.url")
      = f.url_field :content_url, label: false, maxlength: 128, type: "url", class: "radius"

  .row
    .large-12.columns
      %label{for: "tags"}
        %i.fa.fa-tags.fa-fw.fa-lg.subheader
        = t("event.tags")
        %i.fa.fa-question-circle.fa-fw{"aria-haspopup" => "true", "data-tooltip" => "", title: t("event.tag_format")}
      = f.text_field :tags, label: false, maxlength: 128, class: "radius", placeholder: t("event.tag_format")

  .row
    .large-4.columns
      %label{for: "language"}
        %i.fa.fa-globe.fa-fw.fa-lg.subheader
        = t("event.language")
        %small
          = t("event.required")
      = select("event", "language", t("event.languages").keys.collect {|l| [t("event.languages.#{l}").humanize, l]},{include_blank: true, selected: "selected"}, required: true, class: "radius")

    .large-4.columns
      %label{for: "duration"}
        %i.fa.fa-clock-o.fa-fw.fa-lg.subheader
        = t("event.duration").humanize
      %select
        = options_for_select([['30 min',1], ['1 hora',2]],  class: "radius")

    .large-4.columns
      %label{for: "level"}
        %i.fa.fa-lightbulb-o.fa-lg.subheader
        = t("event.level")
        %small
          = t("event.required")
      = select("event", "level", Event.levels.keys.collect {|l| [t("event.levels.#{l}").humanize, l]}, { include_blank: true, selected: "selected"}, class: "radius", required: true, label: false)
      /%span.level-name

      -# .row.hide-for-touch
      -#   .large-12.columns
      -#     - Event.levels.keys.each do |l|
      -#       = radio_button("event", "level", "#{l}")
      -#       %label
      -#         = t("event.levels.#{l}").humanize

  .row
    .large-12.columns
      %label{for: "comments"}
        %i.fa.fa-comments.fa-fw.fa-lg.subheader
{'fraction_non_alphanumeric': 0.18087557603686635, 'fraction_numerical': 0.01228878648233487, 'mean_word_length': 2.4112639161755074, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6072587', 'n_tokens_mistral': 1920, 'n_tokens_neox': 1872, 'n_words': 323}