<div class="row mb-3">
  <div class="col-12">
    <h1>Add new hardware</h1>
  </div>
</div>

<div class="row mb-3">

  <form class="col-12" action="/hardware/<%= hardware.id %>/edit" method="post">
    <div class="row mb-3">
      <div class="col-12 col-md-9">
        <label for="hardware_name">Hardware name</label>
        <input id="hardware_name" class="form-control" type="text" name="hardware_name" placeholder="Example hardware" value="<%= hardware.name %>">
      </div>

      <div class="col-12 col-md-3">
        <label for="hardware_type">Type</label>
        <select id="hardware_type" class="form-select" name="hardware_type">
          <option value="gpu" <% if hardware.type == 'gpu' %>selected<% end %>>Graphics card</option>
            <option value="cpu" <% if hardware.type == 'cpu' %>selected<% end %>>Processor</option>
        </select>
      </div>
    </div>

    <div class="row">
      <div class="col-12">
        <input class="btn btn-primary w-100" type="submit" value="Submit Changes">
      </div>
    </div>
  </form>

</div>
