<commit_before><div class="row">
  <div class="small-12 columns">
    <%= form_for(@restaurant) do |f| %>
    <div class="form-steps-container">
      <ul id="formprogress">
        <li class="active">Information</li>
        <li>Restaurateur</li>
      </ul>

      <% if @restaurant.errors.any? %>
      <div id="error_explanation" class="small-10 medium-8 large-6 small-centered columns">
        <h2><%= pluralize(@restaurant.errors.count, "error") %> prohibited this restaurant from being saved:</h2>

        <ul>
          <% @restaurant.errors.full_messages.each do |message| %>
          <li><%= message %></li>
          <% end %>
        </ul>
      </div>
      <% end %>

      <fieldset>
        <%= f.text_field :nom %>
        <%= link_to "Suivant", '#', class: "right button tiny secondary next" %>
      </fieldset>

      <fieldset>
        <%= f.select :mock_restaurateur, Restaurant::RESTAURATEURS.collect {|r| [ r.capitalize, r ] }, prompt: 'Selectionner un Restaurateur', label: 'Restaurateur' %>
        <div class="actions">
          <%= link_to "Précédant", '#', class: "left button tiny secondary previous" %>
          <%= f.submit class: "button right", onclick: "confirmWithRestaurateurWarning(this); return false;" %>
        </div>
      </fieldset>
    </div>
    <% end %>
    <div class="clearfix"></div>
  </div>
</div>
<div id="confirmModal" class="reveal-modal" data-reveal>
  <h2>Pas de Restaurateur Modal</h2>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed dui felis, gravida id ornare auctor, pharetra non purus. Pellentesque fermentum lectus sit amet elementum finibus. Ut auctor dui eu nibh tristique, at dapibus sem elementum. Curabitur faucibus tellus nibh.</p>
  <p>
    <ul class="button-group radius right">
    <li><a href="#" class="button small" onclick="$('form').submit()">Confirmer</a></li>
      <li><a href="#" class="secondary button small" onclick="$('a.close-reveal-modal').trigger('click');">Annuler</a></li>
    </ul>
  </p>
  <a class="close-reveal-modal">&#215;</a>
</div>

<script type="text/javascript">
  function confirmWithRestaurateurWarning(elm) {
    if (!$("#restaurant_mock_restaurateur").val()) {
      $('#confirmModal').foundation('reveal', 'open');
      return false;
    } else {
      console.log(elm);
      $('form').submit();
    }
  }
</script><commit_msg>FIX : remis un submit et retrait du log inutile.<commit_after><div class="row">
  <div class="small-12 columns">
    <%= form_for(@restaurant) do |f| %>
    <div class="form-steps-container">
      <ul id="formprogress">
        <li class="active">Information</li>
        <li>Restaurateur</li>
      </ul>

      <% if @restaurant.errors.any? %>
      <div id="error_explanation" class="small-10 medium-8 large-6 small-centered columns">
        <h2><%= pluralize(@restaurant.errors.count, "error") %> prohibited this restaurant from being saved:</h2>

        <ul>
          <% @restaurant.errors.full_messages.each do |message| %>
          <li><%= message %></li>
          <% end %>
        </ul>
      </div>
      <% end %>

      <fieldset>
        <%= f.text_field :nom %>
        <%= link_to "Suivant", '#', class: "right button tiny secondary next" %>
      </fieldset>

      <fieldset>
        <%= f.select :mock_restaurateur, Restaurant::RESTAURATEURS.collect {|r| [ r.capitalize, r ] }, prompt: 'Selectionner un Restaurateur', label: 'Restaurateur' %>
        <div class="actions">
          <%= link_to "Précédant", '#', class: "left button tiny secondary previous" %>
          <%= f.submit class: "button right", onclick: "confirmWithRestaurateurWarning(this); return false;" %>
        </div>
      </fieldset>
    </div>
    <% end %>
    <div class="clearfix"></div>
  </div>
</div>
<div id="confirmModal" class="reveal-modal" data-reveal>
  <h2>Pas de Restaurateur Modal</h2>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed dui felis, gravida id ornare auctor, pharetra non purus. Pellentesque fermentum lectus sit amet elementum finibus. Ut auctor dui eu nibh tristique, at dapibus sem elementum. Curabitur faucibus tellus nibh.</p>
  <p>
    <ul class="button-group radius right">
    <li><a href="#" class="button small" onclick="$('form').submit()">Confirmer</a></li>
      <li><a href="#" class="secondary button small" onclick="$('a.close-reveal-modal').trigger('click');">Annuler</a></li>
    </ul>
  </p>
  <a class="close-reveal-modal">&#215;</a>
</div>

<script type="text/javascript">
  function confirmWithRestaurateurWarning(elm) {
    if (!$("#restaurant_mock_restaurateur").val()) {
      $('#confirmModal').foundation('reveal', 'open');
      return false;
    } else {
      $('form').submit();
    }
  }
</script>
{'fraction_non_alphanumeric': 0.17966603255125765, 'fraction_numerical': 0.00549566687803847, 'mean_word_length': 3.198757763975155, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 129, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5611647', 'n_tokens_mistral': 1655, 'n_tokens_neox': 1542, 'n_words': 362}