fix error

This commit is contained in:
BOYA,CHIU 2021-08-04 13:11:46 +08:00
parent ae192c2847
commit fd556fe0fa
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@
<div class="control-group"> <div class="control-group">
<label class="control-label muted"><%= t("ruling_bus.city") %></label> <label class="control-label muted"><%= t("ruling_bus.city") %></label>
<div class="controls"> <div class="controls">
<%= f.select :city,RulingBusesHelper.get_available_cities %> <%= f.select :city,[""]+RulingBusesHelper.get_available_cities %>
</div> </div>
</div> </div>
<% stops = f.object.city.blank? ? [] : RulingBusesHelper.get_stops_for_city(f.object.city,f.object.location_code,f.object.locale) %> <% stops = f.object.city.blank? ? [] : RulingBusesHelper.get_stops_for_city(f.object.city,f.object.location_code,f.object.locale) %>
@ -93,7 +93,7 @@
id: id id: id
}); });
}) })
$("#ruling_bus_info_monitor_point,#ruling_bus_info_destination").empty().select2({ $("#ruling_bus_info_monitor_point,#ruling_bus_info_destination").select2('destroy').empty().select2({
data: options data: options
}); });
$("#ruling_bus_info_monitor_point,#ruling_bus_info_destination").removeAttr('disabled'); $("#ruling_bus_info_monitor_point,#ruling_bus_info_destination").removeAttr('disabled');