<commit_before><%= form_for [:admin, @event],  html: {class: 'form-horizontal admin_event_form'}  do |f| %>
  

  <%= hidden_field( :event, :conference_id, value: params["conf_id"] || 
      if( @event.conference ) then @event.conference.id end || Conference.last.id )%> 

  <div class="form-group">
    <%= f.label :event_type_id, 'Event type*', class: "col-lg-2 control-label"%>
    <div class="col-lg-10">
      <%= select_tag 'event[event_type_id]', options_from_collection_for_select(EventType.all, 'id', 'name', @event_type.id), class: "form-control ", onchange: 'setDefaultData()', speakerEvent: @speaker_event %>
    </div>
  </div>

  <div class="form-group">
    <%= f.label :duration, class: "col-lg-2 control-label" %>
    <div class='col-lg-10'>
    <%= f.time_select :duration, {start_hour: 0, end_hour: 4, minute_step: 5, time_separator: ''}, class: 'btn-default btn-xs' %>
    </div>
  </div>

  <div class="form-group">
    <%= f.label :title, 'Name*', class: "col-lg-2 control-label"%>
    <div class='col-lg-10'>
      <%= f.text_field :title, class: "form-control" %>
    </div>
  </div>

  <div class="form-group">
    <%= f.label :description, class: "col-lg-2 control-label" %>
    <div class="col-lg-10">
      <%= render "admin/share/wysiwyg" %> 
      <div id="editor" class="well col-md-9 col-lg-7 form-control"></div>
    </div>
    <%= f.hidden_field :description, class: 'wysiwyg_textarea' %>
  </div>

  <div class="form-group" id='event_speaker_id_group'>
    <%= label_tag "speaker_search", 'Speaker*', class: "col-lg-2 control-label"%>
    <div class="col-lg-10">
      <%= text_field_tag "speaker_search", @event.speaker ? @event.speaker.fullname : nil, class: 'form-control', autocomplete: "off"%>
      <%= f.hidden_field :speaker_id, class: 'form-control' %>
    </div>
    <div id='speakers-list' class='col-lg-10 col-lg-offset-2'></div>
  </div>

  <div class="form-group" id='event_materials_group'>
    <%= f.label :materials, class: "col-lg-2 control-label"%>
    <div class="col-lg-10">
      <%= f.file_field :materials, class: "btn btn-default file_input" %>
    </div>
  </div>
  
  <div class="form-group" id='event_responsable_group'>
    <%= f.label :responsable, class: "col-lg-2 control-label"%>
    <div class="col-lg-10">
      <%= f.text_field :responsable, class: 'form-control' %>
    </div>
  </div>

  <div class="form-group" >
    <%= f.label :video, class: "col-lg-2 control-label"%>
    <div class="col-lg-10">
      <%= f.text_field :video, class: 'form-control' %>
    </div>
  </div>

  <%= f.hidden_field :published %>
  <%= f.hidden_field :position, value: @event.position || Event.get_new_position(params[:conf_id]) %>

  <div class="form-group">
    <div class="col-lg-10 col-lg-offset-2">
      <%= link_to 'Back', admin_events_path, class: "btn btn-default" %>
      <%= f.submit class: "btn btn-primary"%>
    </div>
  </div>
<% end %><commit_msg>Fixed redirection from edit conferences event back to event list with correct data<commit_after><%= form_for [:admin, @event],  html: {class: 'form-horizontal admin_event_form'}  do |f| %>
  

  <%= hidden_field( :event, :conference_id, value: params["conf_id"] || 
      if( @event.conference ) then @event.conference.id end || Conference.last.id )%> 

  <div class="form-group">
    <%= f.label :event_type_id, 'Event type*', class: "col-lg-2 control-label"%>
    <div class="col-lg-10">
      <%= select_tag 'event[event_type_id]', options_from_collection_for_select(EventType.all, 'id', 'name', @event_type.id), class: "form-control ", onchange: 'setDefaultData()', speakerEvent: @speaker_event %>
    </div>
  </div>

  <div class="form-group">
    <%= f.label :duration, class: "col-lg-2 control-label" %>
    <div class='col-lg-10'>
    <%= f.time_select :duration, {start_hour: 0, end_hour: 4, minute_step: 5, time_separator: ''}, class: 'btn-default btn-xs' %>
    </div>
  </div>

  <div class="form-group">
    <%= f.label :title, 'Name*', class: "col-lg-2 control-label"%>
    <div class='col-lg-10'>
      <%= f.text_field :title, class: "form-control" %>
    </div>
  </div>

  <div class="form-group">
    <%= f.label :description, class: "col-lg-2 control-label" %>
    <div class="col-lg-10">
      <%= render "admin/share/wysiwyg" %> 
      <div id="editor" class="well col-md-9 col-lg-7 form-control"></div>
    </div>
    <%= f.hidden_field :description, class: 'wysiwyg_textarea' %>
  </div>

  <div class="form-group" id='event_speaker_id_group'>
    <%= label_tag "speaker_search", 'Speaker*', class: "col-lg-2 control-label"%>
    <div class="col-lg-10">
      <%= text_field_tag "speaker_search", @event.speaker ? @event.speaker.fullname : nil, class: 'form-control', autocomplete: "off"%>
      <%= f.hidden_field :speaker_id, class: 'form-control' %>
    </div>
    <div id='speakers-list' class='col-lg-10 col-lg-offset-2'></div>
  </div>

  <div class="form-group" id='event_materials_group'>
    <%= f.label :materials, class: "col-lg-2 control-label"%>
    <div class="col-lg-10">
      <%= f.file_field :materials, class: "btn btn-default file_input" %>
    </div>
  </div>
  
  <div class="form-group" id='event_responsable_group'>
    <%= f.label :responsable, class: "col-lg-2 control-label"%>
    <div class="col-lg-10">
      <%= f.text_field :responsable, class: 'form-control' %>
    </div>
  </div>

  <div class="form-group" >
    <%= f.label :video, class: "col-lg-2 control-label"%>
    <div class="col-lg-10">
      <%= f.text_field :video, class: 'form-control' %>
    </div>
  </div>

  <%= f.hidden_field :published %>
  <%= f.hidden_field :position, value: @event.position || Event.get_new_position(params[:conf_id]) %>

  <div class="form-group">
    <div class="col-lg-10 col-lg-offset-2">
      <%= link_to 'Back', admin_events_path(conf_id: @event.conference_id), class: "btn btn-default" %>
      <%= f.submit class: "btn btn-primary"%>
    </div>
  </div>
<% end %>
{'fraction_non_alphanumeric': 0.2062984169754126, 'fraction_numerical': 0.011788480970023578, 'mean_word_length': 3.586100386100386, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 0, '>': 133, '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': '2216623', 'n_tokens_mistral': 2346, 'n_tokens_neox': 2215, 'n_words': 437}