Commit e0a3a7c3 authored by Mateus Ravedutti's avatar Mateus Ravedutti
Browse files

Fix city hall select on page update

parent 8ec112b0
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<%= f.label :service_places_city_hall_id, t(:city_hall) %><br /> <%= f.label :service_places_city_hall_id, t(:city_hall) %><br />
<% if @currentProfessionalServicePlace.role == "adm_c3sl" %> <% if @currentProfessionalServicePlace.role == "adm_c3sl" %>
<%= f.collection_select :service_places_city_hall_id_eq, CityHall.active.order(:name), <%= f.collection_select :service_places_city_hall_id_eq, CityHall.active.order(:name),
:id, :name, { :include_blank => "Todos" }, { :class => "search-field" } %> :id, :name, { :include_blank => "Todos", selected: 0 }, { :class => "search-field" } %>
<% else %> <% else %>
<%= f.collection_select :service_places_city_hall_id_eq, CityHall.where(id: @currentCityHall.id), <%= f.collection_select :service_places_city_hall_id_eq, CityHall.where(id: @currentCityHall.id),
:id, :name, { disabled: true }, { :class => "search-field" } %> :id, :name, { disabled: true }, { :class => "search-field" } %>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<%= f.label :service_place_city_hall_id, t(:city_hall) %><br /> <%= f.label :service_place_city_hall_id, t(:city_hall) %><br />
<% if @currentProfessionalServicePlace.role == "adm_c3sl" %> <% if @currentProfessionalServicePlace.role == "adm_c3sl" %>
<%= f.collection_select :service_place_city_hall_id_eq, CityHall.active.order(:name), <%= f.collection_select :service_place_city_hall_id_eq, CityHall.active.order(:name),
:id, :name, { :include_blank => "Todos" }, { :class => "search-field" } %> :id, :name, { :include_blank => "Todos", selected: 0 }, { :class => "search-field" } %>
<% else %> <% else %>
<%= f.collection_select :service_place_city_hall_id_eq, CityHall.where(id: @currentCityHall.id), <%= f.collection_select :service_place_city_hall_id_eq, CityHall.where(id: @currentCityHall.id),
:id, :name, { disabled: true }, { :class => "search-field" } %> :id, :name, { disabled: true }, { :class => "search-field" } %>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment