<% page_title t('titles.schools'), @school.displayName, t('titles.devices'), @device.cn, t('titles.edit') %>

<div class="formContainer">

<h1><%= t('.edit') %></h1>

<%= render :partial => 'form',
 :locals => {
  :path => device_path(@school, @device),
  :submit_text => t('link.update'),
  :method => :put
}
%>

</div>

<%= render partial: 'shared/puavoconf_editor_templates' %>
<%= render partial: 'shared/puavoconf_editor', locals: { storage: 'device_puavoConf' } %>

<% if @image_filenames_by_release %>
<%= render partial: 'shared/known_recent_releases_selector', formats: :js, locals: { edit_field: 'device_puavoDeviceImage' } %>
<% end %>

<% if @permit_edit_expiration_times && @device && @device.puavoDeviceType != 'bootserver' %>
<%= render partial: 'shared/expiration_time_editor', locals: {
        expirationTimeField: "input#device_puavoDeviceExpirationTime",
        clearExpirationTimeButton: "button#clearExpirationTime",
        expirationPresetsSelect: "select#setExpirationTime",
        expirationValue: "input#expirationValue",
        initialExpirationTime: @device.puavoDeviceExpirationTime.nil? ? nil : @device.puavoDeviceExpirationTime
    } %>
<% end %>
