<%= javascript_include_tag "concerto_weather/application" %> <%= stylesheet_link_tag "concerto_weather/application" %>
Weather
<% if ConcertoConfig["open_weather_map_api_key"].blank? %>
The OpenWeatherMap API Key under Settings appears to be blank. An API key is required for this content.
<% end %>
<%= form.fields_for :config do |config| %>
<%= config.label :city_query, "City Search" %>
<%= config.text_field :city_query, placeholder:"Name or Zipcode", value: @content.config['city_id'] %> <%= button_tag type: "button", :class => "btn", onclick: "searchForCityInfo()" do %> <% end %>
<%= config.label :units %>
<%= config.select :units, Weather::UNITS.map {|k,v| [v, k]}, :selected => @content.config['units'] %>
<%= config.label :font_name %>
<%= config.select :font_name, Weather::FONTS.map {|k,v| [v, k]}, :selected => @content.config['font_name'] %>
<%= config.label :forecast_type %>
<%= config.select :forecast_type, Weather::FORECAST.map {|k,v| [v, k]}, :selected => @content.config['forecast_type'] %>
<%= config.label :format_string, "Format String" %>
<%= config.text_area :format_string, placeholder:"Format String for the weather output", value: @content.config['format_string'], rows: 6 %>
<%= config.hidden_field :lat %> <%= config.hidden_field :lng %> <% end %>