{% extends "settings/index.html" %}

{% block header_text %}<h1><i class="fa-solid fa-pen"></i> Update Container</h1>{% endblock %}

{% block main %}
{% include "settings/containers/form.html" %}
    <div class="container">
    <form method="post">
      <input type="hidden" name="id" value="{{ container.id }}">
      <div>
        <label for="name"><i class="fa-solid fa-box"></i> Name</label>
        <input type="text" id="name" name="name" value="{{ container.name }}" required>
      </div>
      <div>
        <label for="status"><i class="fa-solid fa-info-circle"></i> Status</label>
        <input type="text" id="status" name="status" value="{{ container.status }}" required>
      </div>
      <div>
        <label for="resources"><i class="fa-solid fa-memory"></i> Resources</label>
        <input type="text" id="resources" name="resources" value="{{ container.resources }}">
      </div>
      <div>
        <label for="user_uid"><i class="fa-solid fa-user"></i> User UID</label>
        <input type="text" id="user_uid" name="user_uid" value="{{ container.user_uid }}">
      </div>
      <div>
        <label for="path"><i class="fa-solid fa-folder"></i> Path</label>
        <input type="text" id="path" name="path" value="{{ container.path }}">
      </div>
      <div>
        <label>
            <input type="checkbox" name="readonly" value="1" {% if container.readonly %}checked{% endif %}>
            <i class="fa-solid fa-lock"></i> Readonly
        </label>
      </div>
      <button type="submit"><i class="fa-solid fa-pen"></i> Update</button>
      <button onclick="history.back()" class="cancel"><i class="fa-solid fa-arrow-left"></i>Cancel</button>
    </form>
  </div>
{% endblock %}
