Files
Inventory/inventory/templates/inventory/quick_add.html
2026-09-29 08:43:05 +02:00

14 lines
1.2 KiB
HTML

{% extends 'inventory/base.html' %}{% block title %}Neues Gerät{% endblock %}{% block content %}
<section class="narrow-page"><div class="page-head"><div><h1>Neues Gerät</h1><p>Typ auswählen und die passenden Daten direkt erfassen.</p></div></div>
<div class="form-card"><form method="post" class="app-form" data-device-type-form data-hide-hardware-without-type>
{% csrf_token %}{{ form.non_field_errors }}
{% for field in form %}{% if field.name not in all_hardware_fields %}<label>{{ field.label }}{{ field }}{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}{{ field.errors }}</label>{% endif %}{% endfor %}
<section class="quick-hardware-section" data-hardware-section hidden>
<h2>Technische Daten <small data-selected-type-label></small></h2>
<div class="quick-hardware-grid">{% for field in form.hardware_fields %}<label data-hardware-field="{{ field.name }}" hidden>{{ field.label }}{{ field }}{{ field.errors }}</label>{% endfor %}</div>
</section>
<div class="form-actions"><a class="btn" href="{% url 'inventory:device-list' %}">Abbrechen</a><button class="btn primary">Gerät anlegen</button></div>
</form></div></section>
{{ type_field_map|json_script:'device-type-fields' }}
{% endblock %}