<%= provide(:title, 'Run') %>

<div class="container trigger-job-form">
  <%= form_tag(trigger_job_path, method: :post, class: '.form-horizontal') do %>
    <div class="form-group environment">
      <%= label_tag :environment, 'Environment' %>
      <% if @environments %>
        <%= select_tag :environment, options_for_select(@environments), class: 'form-control' %>
      <% else %>
        <%= text_field_tag :environment, '', class: 'form-control', placeholder: 'staging-ffa-18' %>
      <% end %>
    </div>

    <div class="form-group browser">
      <%= label_tag :browser, 'Browser' %>
      <%= select_tag :browser, options_for_select(@browsers), class: 'form-control' %>
    </div>

    <div class="form-group operating-system">
      <%= label_tag :os, 'Operating System' %>
      <%= select_tag :os, options_for_select(@operating_system), class: 'form-control' %>
    </div>

    <%= (hidden_field_tag :uid, current_user.uid) if logged_in? %>
    <%= submit_tag 'Start Build', class: 'btn btn-primary' %>
  <% end %>
</div>
