<%= form_for([@screen, @field, @field_config]) do |f| %>
  <%= render partial: "layouts/errors", object: @field_config %>
  <fieldset>
    <div class="row-fluid">
      <div class="span4">
        <div class="clearfix">
          <%= f.label :key %>
          <div class="input">
            <%= f.text_field :key, class: "input-xlarge", readonly: true %>
          </div>
        </div>
        <div class="clearfix">
          <%= f.label :value %>
          <div class="input">
            <% case @field_config.key_type %>
              <% when :boolean %>
                <%= f.check_box :value, class: "input-xlarge" %>
              <% when :select %>
                <%= f.select :value, @field_config.key_options, class: "input-xlarge" %>
              <% else %>
                <%= f.text_field :value, class: "input-xlarge" %>
              <% end %>
          </div>
        </div>
      </div>
    </div>
  </fieldset>
  <div class="submit_bar actions">
    <%= f.submit class: "btn btn-primary" %>
    <%= link_to t(:cancel), screen_field_field_configs_path, class: "btn" %>
  </div>
<% end %>
