<%= form_for(@scenario, :method => @scenario.new_record? ? "POST" : "PUT") do |f| %> <% if @scenario.errors.any? %>

<%= pluralize(@scenario.errors.count, "error") %> prohibited this Scenario from being saved:

<% @scenario.errors.full_messages.each do |msg| %>

<%= msg %>

<% end %>
<% end %>
<%= f.label :name %> <%= f.text_field :name, :class => 'form-control', :placeholder => "Name your Scenario" %>
<%= f.label :tag_bg_color, "Tag Background Color" %> <%= f.color_field :tag_bg_color, :class => 'form-control', :value => @scenario.tag_bg_color || default_scenario_bg_color %>
<%= f.label :tag_fg_color, "Tag Foreground Color" %> <%= f.color_field :tag_fg_color, :class => 'form-control', :value => @scenario.tag_fg_color || default_scenario_fg_color %>
<%= f.label :description, "Optional Description" %> <%= f.text_area :description, :rows => 10, :class => 'form-control', :placeholder => "Optionally describe what this Scenario will do. If this will be public, you should also include some contact information." %>
<%= f.label :public do %> <%= f.check_box :public %> Share this Scenario publicly <% end %>
<%= f.label :icon %> <%= f.select(:icon, options_for_select(Scenario.icons, @scenario.icon), {}, {:style => "font-family:'FontAwesome', Arial;", :class => 'select2-fountawesome-icon'}) %>
<%= f.label :agents %> <%= f.select(:agent_ids, options_for_select(current_user.agents.pluck(:name, :id), @scenario.agent_ids), {}, { :multiple => true, :size => 5, :class => 'select2-linked-tags form-control', data: {url_prefix: '/agents'} }) %>
<%= f.submit "Save Scenario", :class => "btn btn-primary" %>
<% end %>