%# javascript_include_tag "select2/select2.min" %>
<%# stylesheet_link_tag "select2/select2" %>
<%= select_category(f, @module_app) %>
<%= f.select :city,RulingBusesHelper.get_available_cities %>
<% stops = f.object.city.blank? ? [] : RulingBusesHelper.get_stops_for_city(f.object.city,f.object.location_code,f.object.locale) %>
<%= f.hidden_field :locale %>
<%= f.hidden_field :location_code %>
<%= f.hidden_field :cache_data %>
<%= f.hidden_field :route_names, value: f.object.route_names.join(',') %>
<%= f.select :monitor_point,stops %>
<%= f.select :destination,stops %>
<%= f.select :direction,RulingBusesHelper::Directions[I18n.locale].map{|k,v| [v,k]} %>
<%= RulingBusesHelper.multiple_lang_tag(nil,'text_field','hint_translations',f.object.hint_translations,{placeholder: t('ruling_bus.hint')}) %>
<%= f.object.route_names.join('
').html_safe %>
<%#= f.hidden_field :time_offset, :id=>"weather_timeoffset" %>
<% referer = request.referer rescue nil %>
<% referer = get_referer_url if referer.blank? || request.host != URI.parse(URI.encode(referer)).host %>
<%= f.submit t('ruling_bus.save'), class: 'btn btn-primary' %>
<%= link_to t('cancel'), referer, :class=>"btn" %>