<!-- shared/_form_purchase_information starts -->
<h2><%= t('shared.purchase_information') %></h2>
<table class="editForm">
  <tr>
    <th><%= f.label :puavoPurchaseDate %></th>
    <td class="devicePurchaseDate"><%= f.date_select :puavoPurchaseDate, :include_blank => true, :order => [:year, :month, :day], :start_year => 2000, :end_year => 2050 %></td>
  </tr>

  <tr>
    <th><%= f.label :puavoWarrantyEndDate %></th>
    <td class="devicePurchaseDate"><%= f.date_select :puavoWarrantyEndDate, :include_blank => true, :order => [:year, :month, :day], :start_year => 2000, :end_year => 2050 %></td>
  </tr>

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

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

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

  <% if @permit_edit_expiration_times && (@is_new_device || (@device && @device.puavoDeviceType != 'bootserver')) %>
  <tr>
    <th><%= f.label :puavoDeviceExpirationTime %></th>
    <td>
        <div class="flex-cols gap-5px">
          <input type="datetime-local" id="device_puavoDeviceExpirationTime" autocomplete="off" step="1">

          <button type="button" id="clearExpirationTime"><%= t('expiration_times.clear') %></button>

          <select id="setExpirationTime" autocomplete="off">
              <option value="" disabled selected hidden><%= t('expiration_times.presets') %></option>
              <%= expiration_time_presets %>
          </select>
        </div>

        <input type="hidden" id="expirationValue" name="expirationValue" autocomplete="off" value="<%= @device.puavoDeviceExpirationTime.nil? ? '' : @device.puavoDeviceExpirationTime.to_i %>">
    </td>
  </tr>
  <% end %>
</table>
<!-- shared/_form_purchase_information ends -->
