<%# _form.html.erb %>
<%= form_with(model: host) do |form| %> <% if host.errors.any? %>

<%= pluralize(host.errors.count, "error") %> prohibited this host from being saved:

    <% host.errors.each do |error| %>
  • <%= error.full_message %>
  • <% end %>
<% end %>
<%= form.text_field :uuid , { class: "input"} %>
<%= form.text_field :hostname , { class: "input"} %>
<%= form.text_field :ip , { class: "input"} %>
<%= form.text_field :installip , { class: "input"} %>
<%= form.text_field :status , { class: "input"} %>
<%= form.text_field :mac , { class: "input"} %>
<%= form.label :lusk_encrypt, class: "checkbox" %> <%= form.check_box :lusk_encrypt %>
<%= form.label :lusk_device, class: "label is-small" %> <%= form.text_field :lusk_device , { class: "input"} %>
<%= form.label :lusk_key, class: "label is-small" %> <%= form.text_field :lusk_key , { class: "input"} %>
<%= form.text_field :interface , { class: "input"} %>
<%= collection_select(:host, :installtemplate_id, Installtemplate.all, :_id, :name) %>
<%= collection_select(:host, :site_id, Site.all, :_id, :name) %>
<%= form.label :rootaccount, class: "label is-small" %>
<%= form.collection_select :rootaccount_id, Account.all, :id, :name %>
<%= form.label :mainaccount, class: "label is-small" %>
<%= form.collection_select :mainaccount_id, Account.all, :id, :name %>
<%= form.label :discover, class: "checkbox" %> <%= form.check_box :discover %>
<%= form.label :installed, class: "checkbox" %> <%= form.check_box :installed %>
<%= form.label :toinstall, class: "checkbox" %> <%= form.check_box :toinstall %>
<%= link_to "Return", "/hosts", class: "button is-success" %>
<% end %> <%= button_to " Destroy ", @host, method: :delete, class: "button is-danger" %>