{% extends "ereuse_devicehub/base_site.html" %}
{% block main %}

<div class="pagetitle">
  <nav>
    <ol class="breadcrumb">
      <li class="breadcrumb-item"><a href="{{ url_for('inventory.devicelist')}}">Inventory</a></li>
      <li class="breadcrumb-item">Unlink Tag from Device</li>
    </ol>
  </nav>
</div><!-- End Page Title -->

<section class="section profile">
  <div class="row">
    <div class="col-xl-4">

      <div class="card">
              <div class="card-body">

                <div class="pt-4 pb-2">
                  <h1 class="card-title text-center pb-0 fs-4">Unlink Tag from Device</h1>
                  <p class="text-center small">Please enter a code for the tag.</p>
                  {% if form.form_errors %}
                  <p class="text-danger">
                    {% for error in form.form_errors %}
                      {{ error }}<br/>
                    {% endfor %}
                  </p>
                  {% endif %}
                </div>

                <form method="post" class="row g-3 needs-validation" novalidate>
                  {{ form.csrf_token }}

                  <div>
                    <label for="tag" class="form-label">Tag</label>
                    <div class="input-group has-validation">
                      {{ form.tag(class_="form-control") }}
                      <div class="invalid-feedback">Please select tag.</div>
                    </div>
                    {% if form.tag.errors %}
                    <p class="text-danger">
                      {% for error in form.tag.errors %}
                        {{ error }}<br/>
                      {% endfor %}
                    </p>
                    {% endif %}
                  </div>
                  <input class="devicesList" type="hidden" name="device" />

                  <div>
                    <a href="{{ referrer }}" class="btn btn-danger">Cancel</a>
                    <button class="btn btn-primary" type="submit">Unlink</button>
                  </div>
                </form>

              </div>

      </div>

    </div>

    <div class="col-xl-8">
    </div>
  </div>
</section>
{% endblock main %}
