afimb/chouette2

View on GitHub
app/views/connection_links/select_areas.html.erb

Summary

Maintainability
Test Coverage
<%= title_tag t('connection_links.select_areas.title', :connection_link => @connection_link.name ) %>

<%= semantic_form_for [@referential, @connection_link] do |form| %>
<div>
  <%= form.inputs do %>
    <%= form.input :departure_id, :as => :search_stop_area, :json => referential_autocomplete_stop_areas_path(@referential, :format => :json)+"?filter=itl_excluded", :tokenLimit => 1, :hint_text => t('search_hint'), :no_result_text => t('no_result_text'),:searching_text => t('searching_term'), :input_html => { :"data-pre" => Rabl::Renderer.new('autocomplete_stop_areas/show', [@departure].compact, :view_path => 'app/views', :format => :json, :scope => self).render  } %>
    <%= form.input :arrival_id, :as => :search_stop_area, :json =>  referential_autocomplete_stop_areas_path(@referential, :format => :json)+"?filter=itl_excluded", :tokenLimit => 1, :hint_text => t('search_hint'), :no_result_text => t('no_result_text'),:searching_text => t('searching_term'), :input_html => { :"data-pre" => Rabl::Renderer.new('autocomplete_stop_areas/show', [@arrival].compact, :view_path => 'app/views', :format => :json, :scope => self).render }  %>
  <% end %>

   <%= form.actions do %>
     <%= form.action :submit, :as => :button %>
     <%= form.action :cancel, :as => :link %>
   <% end %>
</div>
<% end %>