<!-- shared/_form_main_information starts -->
<table class="editForm">
  <tr>
    <th class="requiredField"><%= f.label :puavoHostname %></th>
    <td>
      <% if f.object.hostCertificates %>
      <%= f.object.puavoHostname %>
      <% else %>
      <%= f.text_field :puavoHostname, :required => 'required', :autofocus => @is_new_device ? true : nil %>
      <% end %>
    </td>
  </tr>

  <% if f.object.class == Device && f.object.puavoDeviceType == 'laptop' %>
  <tr>
    <th><%= f.label :puavoDisplayName %></th>
    <td><%= f.text_field :puavoDisplayName %></td>
  </tr>
  <% end %>

  <tr>
    <th><%= f.label :puavoDeviceType %></th>
    <td><%= Puavo::CONFIG['device_types'][f.object.puavoDeviceType]['label'][I18n.locale.to_s] %></td>
  </tr>

  <tr>
    <th><%= f.label :puavoTag %></th>
    <td><%= f.text_field :puavoTag %></td>
  </tr>

  <%= render( :partial => 'shared/form_puavoconf', :locals => { :f => f } ) %>

  <% unless f.object.classes.include?('puavoPrinter') ||  f.object.classes.include?('puavoOtherDevice') %>
  <tr>
    <th><%= f.label :puavoDeviceStatus %></th>
    <td><%= f.text_field :puavoDeviceStatus %></td>
  </tr>
  <% end %>

  <tr>
    <th><%= f.label :image %></th>
    <td><%= f.file_field(:image, accept: 'image/*') %></td>
  </tr>
</table>
<!-- shared/_form_main_information ends -->
