Refactoring - Fix2

Dieser Commit ist enthalten in:
2025-06-18 00:07:34 +02:00
Ursprung 0ec0d2c267
Commit a9cfecc699
18 geänderte Dateien mit 1412 neuen und 337 gelöschten Zeilen

Datei anzeigen

@@ -13,42 +13,42 @@
<div class="card">
<div class="card-body">
<form method="post" action="/license/edit/{{ license[0] }}" accept-charset="UTF-8">
<form method="post" action="/license/edit/{{ license.id }}" accept-charset="UTF-8">
{% if request.args.get('show_test') == 'true' %}
<input type="hidden" name="show_test" value="true">
{% endif %}
<div class="row g-3">
<div class="col-md-6">
<label class="form-label">Kunde</label>
<input type="text" class="form-control" value="{{ license[2] }}" disabled>
<input type="text" class="form-control" value="{{ license.customer_name }}" disabled>
<small class="text-muted">Kunde kann nicht geändert werden</small>
</div>
<div class="col-md-6">
<label class="form-label">E-Mail</label>
<input type="email" class="form-control" value="{{ license[3] or '-' }}" disabled>
<input type="email" class="form-control" value="-" disabled>
</div>
<div class="col-md-6">
<label for="licenseKey" class="form-label">Lizenzschlüssel</label>
<input type="text" class="form-control" id="licenseKey" name="license_key" value="{{ license[1] }}" required>
<input type="text" class="form-control" id="licenseKey" name="license_key" value="{{ license.license_key }}" required>
</div>
<div class="col-md-6">
<label for="licenseType" class="form-label">Lizenztyp</label>
<select class="form-select" id="licenseType" name="license_type" required>
<option value="full" {% if license[4] == 'full' %}selected{% endif %}>Vollversion</option>
<option value="test" {% if license[4] == 'test' %}selected{% endif %}>Testversion</option>
<option value="full" {% if license.license_type == 'full' %}selected{% endif %}>Vollversion</option>
<option value="test" {% if license.license_type == 'test' %}selected{% endif %}>Testversion</option>
</select>
</div>
<div class="col-md-4">
<label for="validFrom" class="form-label">Gültig von</label>
<input type="date" class="form-control" id="validFrom" name="valid_from" value="{{ license[5].strftime('%Y-%m-%d') }}" required>
<input type="date" class="form-control" id="validFrom" name="valid_from" value="{{ license.valid_from.strftime('%Y-%m-%d') }}" required>
</div>
<div class="col-md-4">
<label for="validUntil" class="form-label">Gültig bis</label>
<input type="date" class="form-control" id="validUntil" name="valid_until" value="{{ license[6].strftime('%Y-%m-%d') }}" required>
<input type="date" class="form-control" id="validUntil" name="valid_until" value="{{ license.valid_until.strftime('%Y-%m-%d') }}" required>
</div>
<div class="col-md-4 d-flex align-items-end">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="isActive" name="is_active" {% if license[7] %}checked{% endif %}>
<input class="form-check-input" type="checkbox" id="isActive" name="is_active" {% if license.is_active %}checked{% endif %}>
<label class="form-check-label" for="isActive">
Lizenz ist aktiv
</label>
@@ -58,7 +58,7 @@
<label for="deviceLimit" class="form-label">Gerätelimit</label>
<select class="form-select" id="deviceLimit" name="device_limit" required>
{% for i in range(1, 11) %}
<option value="{{ i }}" {% if license[10] == i %}selected{% endif %}>{{ i }} {% if i == 1 %}Gerät{% else %}Geräte{% endif %}</option>
<option value="{{ i }}" {% if license.get('device_limit', 3) == i %}selected{% endif %}>{{ i }} {% if i == 1 %}Gerät{% else %}Geräte{% endif %}</option>
{% endfor %}
</select>
<small class="form-text text-muted">Maximale Anzahl gleichzeitig aktiver Geräte</small>
@@ -66,7 +66,7 @@
</div>
<div class="form-check mt-3">
<input class="form-check-input" type="checkbox" id="isTest" name="is_test" {% if license[9] %}checked{% endif %}>
<input class="form-check-input" type="checkbox" id="isTest" name="is_test" {% if license.is_test %}checked{% endif %}>
<label class="form-check-label" for="isTest">
<i class="fas fa-flask"></i> Als Testdaten markieren
<small class="text-muted">(wird von der Software ignoriert)</small>