li7y/templates/item_edit.html

41 lines
1.7 KiB
HTML
Raw Normal View History

2024-07-03 18:47:29 +02:00
{#
SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
{%- import "macros.html" as macros -%}
2024-07-03 18:47:29 +02:00
{% extends "base.html" %}
{% block title %}{% block page_title %}{% call macros::item_name(item, item_class, false) %}{% endblock %} Edit Item {{ branding }}{% endblock %}
2024-07-03 18:47:29 +02:00
{% block main %}
<form method="POST">
<div class="mb-3">
<label for="uuid" class="form-label">UUID</label>
<input type="text" class="form-control" id="uuid" disabled required value="{{ item.id }}">
</div>
<div class="mb-3">
<label for="name" class="form-label">Name</label>
<div class="input-group">
<div class="input-group-text">
<input type="checkbox" class="form-check-input mt-0 input-toggle"{% if item.name.is_some() %} checked{% endif %}>
</div>
<input type="text" class="form-control" id="name" name="name"{% if let Some(name) = item.name %} value="{{ name }}"{% else %} disabled{% endif %}>
</div>
2024-07-03 18:47:29 +02:00
</div>
2024-07-07 13:48:31 +02:00
<div class="mb-3">
<label for="class" class="form-label">Class</label>
<input type="text" class="form-control" id="class" name="class" required value="{{ item.class }}">
</div>
2024-07-05 12:38:45 +02:00
<div class="mb-3">
<label for="parent" class="form-label">Parent</label>
<div class="input-group">
<div class="input-group-text">
<input type="checkbox" class="form-check-input mt-0 input-toggle"{% if item.parent.is_some() %} checked{% endif %}>
</div>
<input type="text" class="form-control" id="parent" name="parent"{% if let Some(parent) = item.parent %} value="{{ parent }}"{% else %} disabled{% endif %}>
</div>
</div>
2024-07-03 18:47:29 +02:00
<button type="submit" class="btn btn-primary">Edit</button>
</form>
{% endblock %}